Skip to content

Commit

Permalink
Input: synaptics - fix crash in synaptics_module_init()
Browse files Browse the repository at this point in the history
'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 ef8313b,
but was introduced about a year earlier with
7705d54 (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>
  • Loading branch information
Jan Beulich authored and Dmitry Torokhov committed Mar 31, 2011
1 parent 799a2a2 commit 7087486
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/input/mouse/synaptics.c
Original file line number Diff line number Diff line change
Expand Up @@ -836,8 +836,8 @@ static const struct dmi_system_id __initconst toshiba_dmi_table[] = {
},

},
{ }
#endif
{ }
};

static bool broken_olpc_ec;
Expand All @@ -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)
Expand Down

0 comments on commit 7087486

Please sign in to comment.