Re: mincore returning -ENOMEM instead of -EFAULT

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

 




On Fri, 23 Feb 2007, Joel Becker wrote:
>
> 	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?

It was intentional, and I don't actually think it was even a change. The 
access_ok() in question is not done on the actual array that we fill up 
with the result of the operation, but on the address range that is being 
queried, and if the queried address range is bogus, we should return 
ENOMEM.

It's even mentioned in the man-page..

We *do* return -EFAULT for the case where the "vec" array itself is not 
mapped.

		Linus
-
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