mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 04:02:20 +00:00
d81916910f
Currently the return value of 'sub_driver->init' is not checked. If
sparse_keymap_setup() called in the init function fails, 'generic_
inputdev' is freed, then it will lead a UAF when using it in generic_
acpi_laptop_init(). Fix it by checking the return value and setting
generic_inputdev to NULL after free, so as to avoid double free it.
The error code in generic_subdriver_init() is always negative, so the
return of generic_subdriver_init() can be simplified.
Fixes:
|
||
---|---|---|
.. | ||
Kconfig | ||
loongson-laptop.c | ||
Makefile |