[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0702251504400.12485@woody.linux-foundation.org>
Date: Sun, 25 Feb 2007 15:06:41 -0800 (PST)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Joel Becker <Joel.Becker@...cle.com>
cc: linux-kernel@...r.kernel.org
Subject: Re: mincore returning -ENOMEM instead of -EFAULT
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 majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists