summaryrefslogtreecommitdiff
path: root/arch/mn10300
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-12-12 17:53:51 (GMT)
committerJiri Slaby <jslaby@suse.cz>2014-03-12 12:25:34 (GMT)
commit319a69da974f9c46a59a49091eaf2e992a44b575 (patch)
treea539d6f4d4ea05bef3cee5e530da894d95c1c146 /arch/mn10300
parent2a352e27de04e0329fa408eb256b8440ff4b4b23 (diff)
downloadlinux-fsl-qoriq-319a69da974f9c46a59a49091eaf2e992a44b575.tar.xz
futex: move user address verification up to common code
commit 5cdec2d833748fbd27d3682f7209225c504c79c5 upstream. When debugging the read-only hugepage case, I was confused by the fact that get_futex_key() did an access_ok() only for the non-shared futex case, since the user address checking really isn't in any way specific to the private key handling. Now, it turns out that the shared key handling does effectively do the equivalent checks inside get_user_pages_fast() (it doesn't actually check the address range on x86, but does check the page protections for being a user page). So it wasn't actually a bug, but the fact that we treat the address differently for private and shared futexes threw me for a loop. Just move the check up, so that it gets done for both cases. Also, use the 'rw' parameter for the type, even if it doesn't actually matter any more (it's a historical artifact of the old racy i386 "page faults from kernel space don't check write protections"). Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'arch/mn10300')
0 files changed, 0 insertions, 0 deletions