Andrew Duggan
8725aa4fa7
HID: rmi: Check that the RMI_STARTED bit is set before unregistering the RMI transport device
...
In the event that the RMI device is unreachable, the calls to rmi_set_mode() or
rmi_set_page() will fail before registering the RMI transport device. When the
device is removed, rmi_remove() will call rmi_unregister_transport_device()
which will attempt to access the rmi_dev pointer which was not set.
This patch adds a check of the RMI_STARTED bit before calling
rmi_unregister_transport_device(). The RMI_STARTED bit is only set
after rmi_register_transport_device() completes successfully.
The kernel oops was reported in this message:
https://www.spinics.net/lists/linux-input/msg58433.html
[jkosina@suse.cz: reworded changelog as agreed with Andrew]
Signed-off-by: Andrew Duggan <aduggan@synaptics.com>
Reported-by: Federico Cerutti <federico@ceres-c.it>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2019-11-18 10:23:45 +01:00
..
2019-09-21 10:55:29 -07:00
2019-09-22 09:39:09 -07:00
2019-09-17 16:54:40 -07:00
2019-09-17 16:22:26 -07:00
2019-09-19 10:06:57 -07:00
2019-09-13 16:44:49 +03:00
2019-09-17 16:57:47 -07:00
2019-09-15 14:17:27 +02:00
2019-09-20 15:53:02 -07:00
2019-09-23 09:31:42 -07:00
2019-09-22 09:30:30 -07:00
2019-09-22 09:30:30 -07:00
2019-09-17 19:15:14 -07:00
2019-09-17 19:15:14 -07:00
2019-09-23 09:31:42 -07:00
2019-09-22 09:30:30 -07:00
2019-09-22 09:39:09 -07:00
2019-09-19 14:14:28 -07:00
2019-09-22 11:31:15 -07:00
2019-09-18 11:14:31 -07:00
2019-09-19 14:19:33 -07:00
2019-09-21 10:07:42 -07:00
2019-11-18 10:23:45 +01:00
2019-09-22 12:02:21 -07:00
2019-09-17 12:35:15 -07:00
2019-09-22 09:30:30 -07:00
2019-09-18 11:14:31 -07:00
2019-09-19 14:14:28 -07:00
2019-09-19 14:14:28 -07:00
2019-09-21 10:26:24 -07:00
2019-09-19 14:14:28 -07:00
2019-09-19 13:48:37 -07:00
2019-09-22 09:30:30 -07:00
2019-09-15 14:17:27 +02:00
2019-09-12 20:45:52 +02:00
2019-09-05 13:17:01 -06:00
2019-09-17 00:54:29 -05:00
2019-09-21 10:40:37 -07:00
2019-09-19 14:14:28 -07:00
2019-09-11 16:11:01 +02:00
2019-09-22 09:30:30 -07:00
2019-09-21 10:07:42 -07:00
2019-09-19 13:27:23 -07:00
2019-09-22 09:30:30 -07:00
2019-09-21 10:26:24 -07:00
2019-09-15 14:17:27 +02:00
2019-09-21 10:55:29 -07:00
2019-09-17 16:57:47 -07:00
2019-09-18 11:14:31 -07:00
2019-09-19 13:48:37 -07:00
2019-09-19 13:27:23 -07:00
2019-09-18 11:14:31 -07:00
2019-09-20 11:48:06 -07:00
2019-09-22 12:04:59 -07:00
2019-09-19 14:19:33 -07:00
2019-09-19 14:14:28 -07:00
2019-09-22 12:04:59 -07:00
2019-09-17 19:15:14 -07:00
2019-09-13 15:57:02 +02:00
2019-09-19 14:14:28 -07:00
2019-09-17 18:40:42 -07:00
2019-09-22 10:55:08 -07:00
2019-09-17 15:33:31 -07:00
2019-09-22 11:05:43 -07:00
2019-09-18 12:34:53 -07:00
2019-09-21 10:50:15 -07:00
2019-09-16 15:52:38 -07:00
2019-09-22 10:52:23 -07:00
2019-09-17 18:40:42 -07:00
2019-09-13 17:23:18 +03:00
2019-09-18 12:34:53 -07:00
2019-09-21 10:50:15 -07:00
2019-09-17 09:44:29 +02:00
2019-09-18 10:50:47 -07:00
2019-09-18 11:14:31 -07:00
2019-09-22 10:34:46 -07:00
2019-09-20 15:06:13 -07:00
2019-09-15 14:17:27 +02:00
2019-09-22 09:30:30 -07:00
2019-09-09 10:43:15 -04:00
2019-09-16 15:48:14 -07:00
2019-09-19 13:27:23 -07:00
2019-09-18 11:05:34 -07:00
2019-09-18 11:05:34 -07:00