Home
last modified time | relevance | path

Searched hist:daf6cd0c (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/input/misc/
H A Duinput.cdaf6cd0c Fri Dec 18 19:32:19 CST 2015 Elias Vanderstuyft <elias.vds@gmail.com> Input: uinput - sanity check on ff_effects_max and EV_FF

Currently the user can set ff_effects_max to zero with the EV_FF bit (and
the FF_GAIN and/or FF_AUTOCENTER bits) set, in this case the uninitialized
methods ff->set_gain and/or ff->set_autocenter can be dereferenced,
resulting in a kernel oops.

Check in uinput_create_device() and print a helpful message and return
-EINVAL in case the check fails.

Signed-off-by: Elias Vanderstuyft <elias.vds@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
daf6cd0c Fri Dec 18 19:32:19 CST 2015 Elias Vanderstuyft <elias.vds@gmail.com> Input: uinput - sanity check on ff_effects_max and EV_FF

Currently the user can set ff_effects_max to zero with the EV_FF bit (and
the FF_GAIN and/or FF_AUTOCENTER bits) set, in this case the uninitialized
methods ff->set_gain and/or ff->set_autocenter can be dereferenced,
resulting in a kernel oops.

Check in uinput_create_device() and print a helpful message and return
-EINVAL in case the check fails.

Signed-off-by: Elias Vanderstuyft <elias.vds@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>