Rodrigo Rivas Costa a955358d54 HID: hidraw: Fix crash on HIDIOCGFEATURE with a destroyed device
Doing `ioctl(HIDIOCGFEATURE)` in a tight loop on a hidraw device
and then disconnecting the device, or unloading the driver, can
cause a NULL pointer dereference.

When a hidraw device is destroyed it sets 0 to `dev->exist`.
Most functions check 'dev->exist' before doing its work, but
`hidraw_get_report()` was missing that check.

Cc: stable@vger.kernel.org
Signed-off-by: Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-04-09 09:30:25 +02:00
..
2017-10-17 12:41:23 +02:00
2015-10-21 13:15:53 +02:00
2014-08-21 10:43:28 -05:00
2017-11-24 14:40:23 +01:00
2015-12-28 13:41:44 +01:00
2013-04-24 16:32:27 +02:00
2017-05-11 10:27:48 +02:00
2015-12-28 13:41:44 +01:00
2018-02-16 13:30:56 +01:00
2015-12-28 13:41:51 +01:00
2015-12-28 13:41:51 +01:00
2015-12-28 13:41:51 +01:00
2015-12-28 13:41:51 +01:00
2015-12-28 13:41:51 +01:00
2015-12-28 13:41:51 +01:00
2015-12-28 13:41:51 +01:00
2015-05-07 10:47:53 +02:00
2015-12-28 13:41:44 +01:00
2014-08-21 10:43:28 -05:00
2015-12-28 13:41:44 +01:00
2018-02-16 13:30:56 +01:00