Alexey Kuznetsov
4e46bf8997
[SCSI] fix crash when disconnecting usb storage
...
__scsi_remove_device() in scsi_forget_host() is executed out of scan_mutex
and races with scsi_destroy_sdev() <- scsi_sysfs_add_devices() <-
scsi_finish_async_scan(). The result is use after free and/or double
free, oops.
The fix is simple, move scsi_forget_host() under scan_mutex.
scsi_forget_host() is just sequence of __scsi_remove_device(). All
another calls of __scsi_remove_device() are made under scan_mutex. So
that it is safe.
Signed-off-by: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-11-26 10:04:22 -06:00
..
2009-04-13 15:04:33 -07:00
2009-09-21 15:15:53 +02:00
2009-04-07 08:31:11 -07:00
2009-04-07 08:31:11 -07:00
2009-03-28 20:30:18 +00:00
2009-10-02 14:01:55 -05:00
2009-11-11 12:21:06 -05:00
2009-10-02 14:01:39 -05:00
2009-10-02 14:01:39 -05:00
2009-10-02 09:45:09 -05:00
2009-06-12 18:01:46 +02:00
2009-09-20 16:01:02 +05:30
2009-08-22 17:52:08 -05:00
2009-09-20 16:01:29 +05:30
2009-09-10 12:08:03 -05:00
2009-11-06 13:10:42 -06:00
2009-10-02 09:46:25 -05:00
2009-09-21 15:14:55 +02:00
2009-10-02 09:49:24 -05:00
2009-10-02 09:44:45 -05:00
2009-06-12 10:02:03 -05:00
2009-08-22 17:52:22 -05:00
2009-10-02 14:13:04 -05:00
2009-09-21 15:14:55 +02:00
2009-06-21 11:12:17 -05:00
2009-05-15 12:23:32 -04:00
2009-05-15 12:24:59 -04:00
2009-05-15 12:24:59 -04:00
2009-04-07 08:31:11 -07:00
2009-04-03 10:17:31 -05:00
2009-04-03 10:17:31 -05:00
2009-04-03 10:17:17 -05:00
2009-04-03 10:17:17 -05:00
2009-04-22 20:39:06 +02:00
2009-04-03 09:25:23 -05:00
2009-06-15 21:30:27 -07:00
2009-07-08 10:30:03 -07:00
2009-04-07 08:31:11 -07:00
2009-04-07 08:31:11 -07:00
2009-08-22 17:52:22 -05:00
2009-08-22 17:51:50 -05:00
2009-10-31 12:11:38 -07:00
2009-05-11 09:50:54 +02:00
2009-06-09 10:31:46 -05:00
2009-11-11 12:14:21 -05:00
2009-11-26 10:04:22 -06:00
2009-10-02 09:45:22 -05:00
2009-10-02 09:45:22 -05:00
2009-04-07 08:31:11 -07:00
2009-11-06 11:09:27 -06:00
2009-11-06 11:09:27 -06:00
2009-04-07 08:31:11 -07:00
2009-10-02 14:01:39 -05:00
2009-10-02 09:50:33 -05:00
2009-04-07 08:31:11 -07:00
2009-06-21 10:52:39 -05:00
2009-10-02 14:01:39 -05:00
2009-09-12 09:35:34 -05:00
2009-07-08 10:30:03 -07:00
2009-10-02 09:50:33 -05:00
2009-04-07 08:31:11 -07:00
2009-06-12 18:01:45 +02:00
2009-06-15 10:09:30 -05:00
2009-05-23 15:44:09 -05:00
2009-04-07 08:31:11 -07:00
2009-11-06 11:09:28 -06:00
2009-09-26 10:17:19 -07:00
2009-06-16 14:15:46 +10:00
2009-05-20 17:21:13 -05:00
2009-05-20 17:21:13 -05:00
2009-04-03 09:25:23 -05:00
2009-10-02 09:47:17 -05:00
2009-06-21 10:52:45 -05:00
2009-10-02 09:46:11 -05:00
2009-09-14 17:55:15 -07:00
2009-09-15 09:50:47 -07:00
2009-03-31 01:14:44 +04:00
2009-11-26 09:43:39 -06:00
2009-11-26 09:43:39 -06:00
2009-05-11 09:50:55 +02:00
2009-11-06 11:09:26 -06:00
2009-09-05 09:42:45 -05:00
2009-08-22 17:52:01 -05:00
2009-06-21 10:52:46 -05:00
2009-04-21 19:40:00 -07:00
2009-10-02 09:46:52 -05:00
2009-11-26 08:54:46 -06:00
2009-10-02 09:47:04 -05:00
2009-10-02 09:47:04 -05:00
2009-08-22 17:52:14 -05:00
2009-10-11 11:12:33 -07:00
2009-04-07 08:31:11 -07:00
2009-04-27 09:32:30 -05:00
2009-10-02 09:45:46 -05:00
2009-10-02 14:11:58 -05:00
2009-09-05 08:50:41 -05:00
2009-07-08 10:30:03 -07:00
2009-05-11 09:50:54 +02:00
2009-06-25 11:37:23 -05:00