mincore returning -ENOMEM instead of -EFAULT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Linus,
	Your fix in commit 2f77d107050abc14bc393b34bdb7b91cf670c250
modifies sys_mincore() to return -ENOMEM instead of -EFAULT on a totally
bogus address.  Was this intentional, or is it something that should be
fixed up?

-       /* check the output buffer whilst holding the lock */
-       error = -EFAULT;
-       down_read(&current->mm->mmap_sem);
+       /* ..and we need to be passed a valid user-space range */
+       if (!access_ok(VERIFY_READ, (void __user *) start, len))
+               return -ENOMEM;

Joel

-- 

"Nobody loves me,
 Nobody seems to care.
 Troubles and worries, people,
 You know I've had my share."

Joel Becker
Principal Software Developer
Oracle
E-mail: [email protected]
Phone: (650) 506-8127
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux