]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Input: synaptics - fix crash in synaptics_module_init()
authorJan Beulich <JBeulich@novell.com>
Thu, 31 Mar 2011 07:01:58 +0000 (00:01 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 31 Mar 2011 07:04:52 +0000 (00:04 -0700)
'struct dmi_system_id' arrays must always have a terminator to keep
dmi_check_system() from looking at data (and possibly crashing) it
isn't supposed to look at.

The issue went unnoticed until ef8313bb1a22e7d2125d9d758aa8a81f1de91d81,
but was introduced about a year earlier with
7705d548cbe33f18ea7713b9a07aa11047aaeca4 (which also similarly changed
lifebook.c, but the problem there got eliminated shortly afterwards).

The first hunk therefore is a stable candidate back to 2.6.33, while
the full change is needed only on 2.6.38.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Cc: stable@kernel.org
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/mouse/synaptics.c

index aa186cf6c514526fec46d40d4d5a47bbe38af0e9..e06e045bf907a4a77ed33998b94ad29438e6c542 100644 (file)
@@ -836,8 +836,8 @@ static const struct dmi_system_id __initconst toshiba_dmi_table[] = {
                },
 
        },
-       { }
 #endif
+       { }
 };
 
 static bool broken_olpc_ec;
@@ -851,8 +851,8 @@ static const struct dmi_system_id __initconst olpc_dmi_table[] = {
                        DMI_MATCH(DMI_PRODUCT_NAME, "XO"),
                },
        },
-       { }
 #endif
+       { }
 };
 
 void __init synaptics_module_init(void)