Thomas Gleixner 64d1304a64 futex: setup writeable mapping for futex ops which modify user space data
The futex code installs a read only mapping via get_user_pages_fast()
even if the futex op function has to modify user space data. The
eventual fault was fixed up by futex_handle_fault() which walked the
VMA with mmap_sem held.

After the cleanup patches which removed the mmap_sem dependency of the
futex code commit 4dc5b7a36a49eff97050894cf1b3a9a02523717 (futex:
clean up fault logic) removed the private VMA walk logic from the
futex code. This change results in a stale RO mapping which is not
fixed up.

Instead of reintroducing the previous fault logic we set up the
mapping in get_user_pages_fast() read/write for all operations which
modify user space data. Also handle private futexes in the same way
and make the current unconditional access_ok(VERIFY_WRITE) depend on
the futex op.

Reported-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
CC: stable@kernel.org
2009-05-19 23:36:52 +02:00
..
2008-10-16 11:21:30 -07:00
2008-07-28 14:37:38 +02:00
2009-05-15 07:56:24 -05:00
2009-01-14 18:09:02 +01:00
2008-09-02 19:21:40 -07:00
2009-03-30 22:05:16 +10:30
2009-04-29 15:02:28 +02:00
2009-04-24 07:47:59 -07:00
2009-04-17 01:57:54 +02:00
2009-03-24 10:52:46 +11:00