linux-stable/drivers/input/rmi4
Dan Carpenter cc56c4d177 Input: synaptics-rmi4 - fix use after free in rmi_unregister_function()
[ Upstream commit eb988e46da ]

The put_device() calls rmi_release_function() which frees "fn" so the
dereference on the next line "fn->num_of_irqs" is a use after free.
Move the put_device() to the end to fix this.

Fixes: 24d28e4f12 ("Input: synaptics-rmi4 - convert irq distribution to irq_domain")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/706efd36-7561-42f3-adfa-dd1d0bd4f5a1@moroto.mountain
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-20 11:57:21 +01:00
..
Kconfig media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
Makefile Input: synaptics-rmi4 - add support for F3A 2020-10-04 19:51:44 -07:00
rmi_2d_sensor.c Input: synaptics-rmi4 - remove the exporting of rmi_2d_sensor_set_input_params 2019-07-24 12:58:11 +03:00
rmi_2d_sensor.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
rmi_bus.c Input: synaptics-rmi4 - fix use after free in rmi_unregister_function() 2023-11-20 11:57:21 +01:00
rmi_bus.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
rmi_driver.c Input: synaptics-rmi4 - fix error return code in rmi_driver_probe() 2020-04-28 16:11:40 -07:00
rmi_driver.h Input: synaptics-rmi4 - add support for F3A 2020-10-04 19:51:44 -07:00
rmi_f01.c Input: synaptics-rmi4 - fix kerneldoc warnings 2020-11-09 16:45:50 -08:00
rmi_f03.c Input: move from strlcpy with unused retval to strscpy 2022-08-18 15:44:08 -07:00
rmi_f3a.c Input: synaptics-rmi4 - add support for F3A 2020-10-04 19:51:44 -07:00
rmi_f11.c Input: synaptics-rmi4 - fix kerneldoc warnings 2020-11-09 16:45:50 -08:00
rmi_f12.c Input: synaptics-rmi4 - do not consume more data than we have (F11, F12) 2019-11-04 16:11:50 -08:00
rmi_f30.c Input: synaptics-rmi4 - rename f30_data to gpio_data 2020-10-04 19:51:43 -07:00
rmi_f34.c Input: synaptics-rmi4 - convert to use sysfs_emit() APIs 2022-09-27 09:00:41 -07:00
rmi_f34.h Input: synaptics-rmi4 - remove unneeded struct register_offset 2022-09-23 13:00:13 -07:00
rmi_f34v7.c Input: synaptics-rmi4 - drop useless gotos in rmi_f34v7_do_reflash() 2022-09-23 13:00:14 -07:00
rmi_f54.c Input: move from strlcpy with unused retval to strscpy 2022-08-18 15:44:08 -07:00
rmi_f55.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
rmi_i2c.c Input: Switch i2c drivers back to use .probe() 2023-05-17 09:59:11 -07:00
rmi_smbus.c Input: synaptics-rmi4 - handle reset delay when using SMBus trsnsport 2023-11-08 14:08:57 +01:00
rmi_spi.c Input: synaptics-rmi4 - fix SPI device ID 2023-02-03 16:53:40 -08:00