[tip:core/urgent] futex: futex mapping needs to be writable

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

 



Commit-ID:  63a8191661268594dfddc66c9b508e654afb8dd9
Gitweb:     http://git.kernel.org/tip/63a8191661268594dfddc66c9b508e654afb8dd9
Author:     Thomas Gleixner <tglx@xxxxxxxxxxxxx>
AuthorDate: Mon, 18 May 2009 10:20:45 +0200
Committer:  Thomas Gleixner <tglx@xxxxxxxxxxxxx>
CommitDate: Mon, 18 May 2009 11:00:50 +0200

futex: futex mapping needs to be writable

commit 734b05b10e51d4ba38c8fc3ee02e846aab09eedf (futex: use
fast_gup()) calls get_user_pages_fast() with the write argument set to
0. This went unnoticed as the futex code had a fixup for repeated
faults in futex_handle_fault(). futex_handle_fault() was removed in
commit e4dc5b7a36a49eff97050894cf1b3a9a02523717 (futex: clean up fault
logic) and unearthed the get_user_pages_fast(write=0) thinko.

[ Impact: fix mapping bug ]

Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Reported-by: Andreas Schwab <schwab@xxxxxxxxxxxxxx>
CC: stable@xxxxxxxxxx


---
 kernel/futex.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/futex.c b/kernel/futex.c
index eef8cd2..09db3ae 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -235,7 +235,7 @@ static int get_futex_key(u32 __user *uaddr, int fshared, union futex_key *key)
 	}
 
 again:
-	err = get_user_pages_fast(address, 1, 0, &page);
+	err = get_user_pages_fast(address, 1, 1, &page);
 	if (err < 0)
 		return err;
 
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux