]> code.ossystems Code Review - openembedded-core.git/commitdiff
linux-rp-2.6.22+2.6.23-rc4: Fix vt_ioctl race.
authorSamuel Ortiz <sameo@openedhand.com>
Thu, 27 Sep 2007 09:15:05 +0000 (09:15 +0000)
committerSamuel Ortiz <sameo@openedhand.com>
Thu, 27 Sep 2007 09:15:05 +0000 (09:15 +0000)
Because of a race between vt_ioctl and the console work queue, psplash
was crashing.

git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2812 311d38ba-8fff-0310-9ca6-ca027cbcb966

meta/packages/linux/linux-rp-2.6.22+2.6.23-rc4/vt_ioctl_race.patch [new file with mode: 0644]
meta/packages/linux/linux-rp_2.6.22+2.6.23-rc4.bb

diff --git a/meta/packages/linux/linux-rp-2.6.22+2.6.23-rc4/vt_ioctl_race.patch b/meta/packages/linux/linux-rp-2.6.22+2.6.23-rc4/vt_ioctl_race.patch
new file mode 100644 (file)
index 0000000..8f53b55
--- /dev/null
@@ -0,0 +1,40 @@
+---
+ drivers/char/vt_ioctl.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+Index: linux-2.6.22/drivers/char/vt_ioctl.c
+===================================================================
+--- linux-2.6.22.orig/drivers/char/vt_ioctl.c  2007-07-09 01:32:17.000000000 +0200
++++ linux-2.6.22/drivers/char/vt_ioctl.c       2007-09-27 11:05:29.000000000 +0200
+@@ -770,6 +770,7 @@
+               /*
+                * Switching-from response
+                */
++              acquire_console_sem();
+               if (vc->vt_newvt >= 0) {
+                       if (arg == 0)
+                               /*
+@@ -784,7 +785,6 @@
+                                * complete the switch.
+                                */
+                               int newvt;
+-                              acquire_console_sem();
+                               newvt = vc->vt_newvt;
+                               vc->vt_newvt = -1;
+                               i = vc_allocate(newvt);
+@@ -798,7 +798,6 @@
+                                * other console switches..
+                                */
+                               complete_change_console(vc_cons[newvt].d);
+-                              release_console_sem();
+                       }
+               }
+@@ -813,6 +812,7 @@
+                       if (arg != VT_ACKACQ)
+                               return -EINVAL;
+               }
++              release_console_sem();
+               return 0;
index 089b458ea40526e3f788d1bfb4ff8a8bcc624625..02ef0994a86e25becbc7857aef8290fe5eeadbb8 100644 (file)
@@ -1,6 +1,6 @@
 require linux-rp.inc
 
-PR = "r4"
+PR = "r5"
 
 DEFAULT_PREFERENCE = "-1"
 DEFAULT_PREFERENCE_htcuniversal = "1"
@@ -53,6 +53,7 @@ SRC_URI = "http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.22.tar.bz2 \
            file://uvesafb-0.1-rc3-2.6.22.patch;patch=1;status=external \
            file://htcuni.patch;patch=1 \
            file://binutils-buildid-arm.patch;patch=1 \
+           file://vt_ioctl_race.patch;patch=1 \
            file://defconfig-c7x0 \
            file://defconfig-hx2000 \
            file://defconfig-collie \
@@ -115,7 +116,9 @@ SRC_URI_append_tosa = "\
            file://wm97xx-lcdnoise-r0.patch;patch=1 "
 #          ${DOSRC}/tosa-asoc-r1.patch;patch=1 "
 
-SRC_URI_append_htcuniversal ="file://htcuni-acx.patch;patch=1;status=external"
+SRC_URI_append_htcuniversal ="\
+       file://htcuni-acx.patch;patch=1;status=external \
+       "
 
 SRC_URI_append_zylonite ="\
        file://arm_pxa_20070923.patch;patch=1 \