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

rpms/kernel/devel linux-2.6-futex-compat-fix.patch, NONE, 1.1 kernel-2.6.spec, 1.3181, 1.3182



Author: davej

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10671

Modified Files:
	kernel-2.6.spec 
Added Files:
	linux-2.6-futex-compat-fix.patch 
Log Message:
* Sun May 27 2007 Dave Jones <davej redhat com>
- Fix up compat futexes.


linux-2.6-futex-compat-fix.patch:

--- NEW FILE linux-2.6-futex-compat-fix.patch ---
Date: Fri, 25 May 2007 23:58:35 -0400
From: Ulrich Drepper <drepper redhat com>
To: davej redhat com
Subject: patch for devel kernel

If you build an f8 kernel before this patch hits Linus' kernel, please
add it to your build.

--- 1/kernel/futex_compat.c	2007-05-09 15:01:23.000000000 -0700
+++ 2/kernel/futex_compat.c-save	2007-05-25 20:53:35.000000000 -0700
@@ -144,20 +144,21 @@ asmlinkage long compat_sys_futex(u32 __u
 	struct timespec ts;
 	ktime_t t, *tp = NULL;
 	int val2 = 0;
+	int cmd = op & FUTEX_CMD_MASK;
 
-	if (utime && (op == FUTEX_WAIT || op == FUTEX_LOCK_PI)) {
+	if (utime && (cmd == FUTEX_WAIT || cmd == FUTEX_LOCK_PI)) {
 		if (get_compat_timespec(&ts, utime))
 			return -EFAULT;
 		if (!timespec_valid(&ts))
 			return -EINVAL;
 
 		t = timespec_to_ktime(ts);
-		if (op == FUTEX_WAIT)
+		if (cmd == FUTEX_WAIT)
 			t = ktime_add(ktime_get(), t);
 		tp = &t;
 	}
-	if (op == FUTEX_REQUEUE || op == FUTEX_CMP_REQUEUE
-	    || op == FUTEX_CMP_REQUEUE_PI)
+	if (cmd == FUTEX_REQUEUE || cmd == FUTEX_CMP_REQUEUE
+	    || cmd == FUTEX_CMP_REQUEUE_PI)
 		val2 = (int) (unsigned long) utime;
 
 	return do_futex(uaddr, op, val, tp, uaddr2, val2, val3);



Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel-2.6.spec,v
retrieving revision 1.3181
retrieving revision 1.3182
diff -u -r1.3181 -r1.3182
--- kernel-2.6.spec	28 May 2007 03:29:08 -0000	1.3181
+++ kernel-2.6.spec	28 May 2007 03:41:50 -0000	1.3182
@@ -927,6 +927,8 @@
 ApplyPatch linux-2.6-optimise-spinlock-debug.patch
 # Silence some useless messages that still get printed with 'quiet'
 ApplyPatch linux-2.6-silence-noise.patch
+# Fix up compat futexes.
+ApplyPatch linux-2.6-futex-compat-fix.patch
 
 # OLPC specific patches
 %if 0%{?olpc}
@@ -1013,10 +1015,6 @@
 #ApplyPatch linux-2.6-firewire.patch
 
 #
-# final stuff
-#
-
-#
 # misc small stuff to make things compile or otherwise improve performance
 #
 #ApplyPatch linux-2.6-compile-fixes.patch
@@ -1971,6 +1969,9 @@
 
 %changelog
 * Sun May 27 2007 Dave Jones <davej redhat com>
+- Fix up compat futexes.
+
+* Sun May 27 2007 Dave Jones <davej redhat com>
 - Apply all patches using -F1, rediff where necessary.
 
 * Sun May 27 2007 Dave Jones <davej redhat com>


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