Hannes Reinecke
81b6c99989
scsi: core: check for device state in __scsi_remove_target()
...
As it turned out device_get() doesn't use kref_get_unless_zero(), so we
will be always getting a device pointer. Consequently, we need to check
for the device state in __scsi_remove_target() to avoid tripping over
deleted objects.
Fixes: fbce4d97fd43 ("scsi: fixup kernel warning during rmmod()")
Reported-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-12-18 22:34:18 -05:00
..
2017-12-14 22:34:28 -05:00
2017-11-14 16:23:44 -08:00
2017-11-14 16:23:44 -08:00
2017-08-10 19:40:50 -04:00
2017-11-02 11:10:55 +01:00
2017-11-14 16:23:44 -08:00
2017-12-07 19:57:54 -05:00
2017-11-15 18:44:56 -05:00
2017-11-14 16:23:44 -08:00
2017-11-14 16:23:44 -08:00
2017-11-14 16:23:44 -08:00
2017-10-31 12:28:04 -04:00
2017-09-25 19:03:14 -04:00
2017-06-20 12:18:27 +02:00
2017-08-24 22:28:52 -04:00
2017-11-15 13:46:33 -08:00
2017-11-02 11:10:55 +01:00
2017-11-14 16:23:44 -08:00
2017-11-01 11:27:06 -07:00
2017-11-02 11:10:55 +01:00
2017-11-13 17:56:58 -08:00
2017-11-28 23:59:09 -05:00
2017-12-11 21:45:34 -05:00
2017-11-28 23:46:06 -05:00
2017-11-14 16:23:44 -08:00
2017-11-15 13:46:33 -08:00
2017-11-01 11:43:47 -07:00
2017-06-27 12:13:21 -06:00
2017-11-02 11:10:55 +01:00
2017-11-14 16:23:44 -08:00
2017-09-07 12:12:43 -07:00
2017-11-15 11:56:19 -08:00
2017-11-14 16:23:44 -08:00
2017-11-01 11:44:40 -07:00
2017-11-14 16:23:44 -08:00
2017-11-02 11:10:55 +01:00
2017-09-08 18:26:48 -07:00
2017-11-21 23:00:44 -05:00
2017-10-25 05:40:22 -04:00
2017-08-25 17:21:11 -04:00
2017-11-02 11:10:55 +01:00
2017-08-25 17:21:10 -04:00
2017-11-02 11:10:55 +01:00
2017-08-25 17:21:10 -04:00
2017-11-02 11:10:55 +01:00
2017-04-04 19:39:39 -04:00
2017-08-25 17:21:11 -04:00
2017-11-02 11:10:55 +01:00
2017-08-24 22:29:07 -04:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-08-25 17:21:11 -04:00
2017-11-02 11:10:55 +01:00
2017-04-21 10:31:33 -04:00
2017-04-21 10:31:33 -04:00
2017-08-24 22:29:06 -04:00
2017-11-02 11:10:55 +01:00
2017-10-27 02:22:00 -07:00
2017-11-02 11:10:55 +01:00
2017-08-25 17:21:11 -04:00
2017-08-10 19:55:35 -04:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-08-25 17:21:12 -04:00
2017-08-10 19:55:35 -04:00
2017-11-02 11:10:55 +01:00
2017-08-25 17:21:10 -04:00
2017-08-25 17:21:10 -04:00
2017-08-25 17:21:11 -04:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-10-27 02:22:00 -07:00
2017-11-02 11:10:55 +01:00
2017-08-25 17:21:10 -04:00
2017-11-02 11:10:55 +01:00
2017-09-05 08:18:42 -04:00
2017-10-25 04:55:18 -04:00
2017-11-14 16:23:44 -08:00
2017-08-24 22:28:55 -04:00
2017-08-25 17:21:10 -04:00
2017-08-25 17:21:11 -04:00
2017-11-02 11:10:55 +01:00
2017-11-01 11:27:07 -07:00
2017-08-08 11:49:51 -04:00
2017-06-20 12:18:27 +02:00
2017-06-20 12:18:27 +02:00
2017-08-25 17:08:08 -04:00
2017-11-15 10:14:11 -08:00
2017-08-22 16:34:36 +02:00
2017-11-13 17:56:58 -08:00
2017-08-07 14:04:02 -04:00
2017-11-02 11:10:55 +01:00
2017-08-10 19:55:34 -04:00
2017-08-25 17:21:11 -04:00
2017-11-14 16:23:44 -08:00
2017-08-07 14:04:01 -04:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-04-24 18:16:49 -04:00
2017-11-14 16:23:44 -08:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-09-01 11:59:17 +02:00
2017-11-02 11:10:55 +01:00
2017-10-16 22:38:44 -04:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-08-24 22:29:01 -04:00
2017-11-02 11:10:55 +01:00
2017-11-01 11:27:09 -07:00
2017-08-07 14:04:01 -04:00
2017-08-25 17:21:11 -04:00
2017-11-02 11:10:55 +01:00
2017-10-05 15:01:17 +02:00
2017-10-05 15:01:17 +02:00
2017-08-25 17:21:11 -04:00
2017-11-02 11:10:55 +01:00
2017-08-25 17:21:11 -04:00
2017-08-28 22:15:46 -04:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-10-31 12:28:05 -04:00
2017-12-11 21:56:48 -05:00
2017-04-26 15:09:04 -06:00
2017-12-14 22:30:24 -05:00
2017-09-25 19:03:22 -04:00
2017-11-14 16:23:44 -08:00
2017-08-25 17:08:07 -04:00
2017-11-02 11:10:55 +01:00
2017-12-07 19:52:55 -05:00
2017-11-14 16:23:44 -08:00
2017-04-13 13:58:20 -04:00
2017-11-16 17:43:27 -05:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-12-14 22:30:24 -05:00
2017-12-18 22:34:18 -05:00
2017-11-02 11:10:55 +01:00
2017-11-14 16:23:44 -08:00
2017-11-14 16:23:44 -08:00
2017-10-16 23:40:51 -04:00
2017-12-14 22:30:24 -05:00
2017-11-07 09:04:32 -08:00
2017-09-07 12:12:43 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-10-16 23:54:33 -04:00
2017-12-11 21:56:48 -05:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-09-07 12:12:43 -07:00
2017-11-14 15:32:19 -08:00
2017-08-25 17:21:10 -04:00
2017-03-15 19:27:46 -04:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-08-25 17:08:08 -04:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-08-08 11:49:51 -04:00
2017-11-02 11:10:55 +01:00
2017-04-26 18:32:29 -04:00
2017-11-06 22:38:29 -05:00
2017-08-25 17:21:11 -04:00
2017-06-27 21:46:55 -04:00
2017-08-24 22:28:51 -04:00
2017-08-25 17:21:10 -04:00
2017-11-02 11:10:55 +01:00
2017-06-12 21:02:04 -04:00
2017-08-22 16:34:36 +02:00