r3059 - branches/src/target/kernel/2.6.23.x/patches

shoragan at sita.openmoko.org shoragan at sita.openmoko.org
Sat Sep 29 18:56:27 CEST 2007


Author: shoragan
Date: 2007-09-29 18:56:26 +0200 (Sat, 29 Sep 2007)
New Revision: 3059

Added:
   branches/src/target/kernel/2.6.23.x/patches/fix-change_console-race.patch
Modified:
   branches/src/target/kernel/2.6.23.x/patches/series
Log:
Fix a race exposed by CFS while switching virtual consoles.
I've submitted this to lkml.

Added: branches/src/target/kernel/2.6.23.x/patches/fix-change_console-race.patch
===================================================================
--- branches/src/target/kernel/2.6.23.x/patches/fix-change_console-race.patch	2007-09-29 13:29:16 UTC (rev 3058)
+++ branches/src/target/kernel/2.6.23.x/patches/fix-change_console-race.patch	2007-09-29 16:56:26 UTC (rev 3059)
@@ -0,0 +1,25 @@
+Index: linux-2.6.22/drivers/char/vt_ioctl.c
+===================================================================
+--- linux-2.6.22.orig/drivers/char/vt_ioctl.c
++++ linux-2.6.22/drivers/char/vt_ioctl.c
+@@ -1208,15 +1208,18 @@
+ 		/*
+ 		 * Send the signal as privileged - kill_pid() will
+ 		 * tell us if the process has gone or something else
+-		 * is awry
++		 * is awry.
++		 *
++		 * We need to set vt_newvt *before* sending the signal or we
++		 * have a race.
+ 		 */
++		vc->vt_newvt = new_vc->vc_num;
+ 		if (kill_pid(vc->vt_pid, vc->vt_mode.relsig, 1) == 0) {
+ 			/*
+ 			 * It worked. Mark the vt to switch to and
+ 			 * return. The process needs to send us a
+ 			 * VT_RELDISP ioctl to complete the switch.
+ 			 */
+-			vc->vt_newvt = new_vc->vc_num;
+ 			return;
+ 		}
+ 

Modified: branches/src/target/kernel/2.6.23.x/patches/series
===================================================================
--- branches/src/target/kernel/2.6.23.x/patches/series	2007-09-29 13:29:16 UTC (rev 3058)
+++ branches/src/target/kernel/2.6.23.x/patches/series	2007-09-29 16:56:26 UTC (rev 3059)
@@ -46,3 +46,4 @@
 neo1973-soc-include-fix.patch
 explicitly-link-notes-section.patch
 fix-s3c2410fb-register-access.patch
+fix-change_console-race.patch





More information about the commitlog mailing list