summaryrefslogtreecommitdiffstats
path: root/meta/packages/linux/linux-rp-2.6.23/vt_ioctl_race.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/linux/linux-rp-2.6.23/vt_ioctl_race.patch')
-rw-r--r--meta/packages/linux/linux-rp-2.6.23/vt_ioctl_race.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/meta/packages/linux/linux-rp-2.6.23/vt_ioctl_race.patch b/meta/packages/linux/linux-rp-2.6.23/vt_ioctl_race.patch
new file mode 100644
index 0000000000..5a51d1c3f5
--- /dev/null
+++ b/meta/packages/linux/linux-rp-2.6.23/vt_ioctl_race.patch
@@ -0,0 +1,46 @@
1---
2 drivers/char/vt_ioctl.c | 8 +++++---
3 1 file changed, 5 insertions(+), 3 deletions(-)
4
5Index: linux-2.6.22/drivers/char/vt_ioctl.c
6===================================================================
7--- linux-2.6.22.orig/drivers/char/vt_ioctl.c 2007-07-09 01:32:17.000000000 +0200
8+++ linux-2.6.22/drivers/char/vt_ioctl.c 2007-09-27 11:58:42.000000000 +0200
9@@ -770,6 +770,7 @@
10 /*
11 * Switching-from response
12 */
13+ acquire_console_sem();
14 if (vc->vt_newvt >= 0) {
15 if (arg == 0)
16 /*
17@@ -784,7 +785,6 @@
18 * complete the switch.
19 */
20 int newvt;
21- acquire_console_sem();
22 newvt = vc->vt_newvt;
23 vc->vt_newvt = -1;
24 i = vc_allocate(newvt);
25@@ -798,7 +798,6 @@
26 * other console switches..
27 */
28 complete_change_console(vc_cons[newvt].d);
29- release_console_sem();
30 }
31 }
32
33@@ -810,9 +809,12 @@
34 /*
35 * If it's just an ACK, ignore it
36 */
37- if (arg != VT_ACKACQ)
38+ if (arg != VT_ACKACQ) {
39+ release_console_sem();
40 return -EINVAL;
41+ }
42 }
43+ release_console_sem();
44
45 return 0;
46