diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2008-10-27 07:16:15 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2008-10-27 10:06:01 -0400 |
commit | 3d5afd324a4bf9f64f59599bf1e93cd7dd1dc97a (patch) | |
tree | 920b64f768d33c1534f6bdc37447f8b80494f9fa /include/linux/hid.h | |
parent | f8d56f1771e4867acc461146764b4feeb5245669 (diff) |
HID: fix oops during suspend of unbound HID devices
Usbhid structure is allocated on start invoked only from probe
of some driver. When there is no driver, the structure is null
and causes null-dereference oopses.
Fix it by allocating the structure on probe and disconnect of
the device itself. Also make sure we won't race between start
and resume or stop and suspend respectively.
References: http://bugzilla.kernel.org/show_bug.cgi?id=11827
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Andreas Schwab <schwab@suse.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'include/linux/hid.h')
-rw-r--r-- | include/linux/hid.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h index 5355ca4b939e..e5780f8c934a 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
@@ -410,6 +410,7 @@ struct hid_output_fifo { | |||
410 | #define HID_SUSPENDED 5 | 410 | #define HID_SUSPENDED 5 |
411 | #define HID_CLEAR_HALT 6 | 411 | #define HID_CLEAR_HALT 6 |
412 | #define HID_DISCONNECTED 7 | 412 | #define HID_DISCONNECTED 7 |
413 | #define HID_STARTED 8 | ||
413 | 414 | ||
414 | struct hid_input { | 415 | struct hid_input { |
415 | struct list_head list; | 416 | struct list_head list; |