Linus Torvalds
a817e73fe6
Revert "scsi: make 'state' device attribute pollable"
...
This reverts commit 8a97712e5314aefe16b3ffb4583a34deaa49de04.
This commit added a call to sysfs_notify() from within
scsi_device_set_state(), which in turn turns out to make libata very
unhappy, because ata_eh_detach_dev() does
spin_lock_irqsave(ap->lock, flags);
..
if (ata_scsi_offline_dev(dev)) {
dev->flags |= ATA_DFLAG_DETACHED;
ap->pflags |= ATA_PFLAG_SCSI_HOTPLUG;
}
and ata_scsi_offline_dev() then does that scsi_device_set_state() to set
it offline.
So now we called sysfs_notify() from within a spinlocked region, which
really doesn't work. The 0day robot reported this as:
BUG: sleeping function called from invalid context at kernel/locking/mutex.c:238
because sysfs_notify() ends up calling kernfs_find_and_get_ns() which
then does mutex_lock(&kernfs_mutex)..
The pollability of the device state isn't critical, so revert this all
for now, and maybe we'll do it differently in the future.
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Acked-by: Tejun Heo <tj@kernel.org>
Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-11-07 09:04:32 -08:00
..
2017-10-16 23:17:52 -04:00
2017-11-02 11:10:55 +01:00
2017-08-25 17:21:10 -04:00
2017-08-10 19:40:50 -04:00
2017-11-02 11:10:55 +01:00
2017-08-07 14:04:01 -04:00
2017-11-02 11:10:55 +01:00
2017-09-07 12:12:43 -07:00
2017-07-26 21:51:25 -04:00
2017-11-02 11:10:55 +01:00
2017-09-07 12:12:43 -07:00
2017-08-25 18:24:04 -04:00
2017-06-26 12:44:35 -04:00
2017-06-20 12:18:27 +02:00
2017-08-24 22:28:52 -04:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-08-25 17:21:10 -04:00
2017-08-25 17:42:42 -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-08-29 21:51:45 -04:00
2017-09-30 12:50:56 -07:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2017-08-25 17:21:10 -04:00
2017-06-27 12:13:21 -06: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-09-07 12:12:43 -07:00
2017-11-03 10:26:40 -07:00
2017-04-26 18:34:34 -04:00
2017-08-29 21:51:44 -04:00
2017-11-02 11:10:55 +01:00
2017-09-08 18:26:48 -07:00
2017-11-02 11:10:55 +01:00
2016-12-24 11:46:01 -08:00
2016-12-14 15:25:12 -05:00
2016-12-24 11:46:01 -08:00
2016-12-14 15:25:12 -05:00
2016-12-24 11:46:01 -08:00
2016-12-14 15:25:12 -05: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-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
2016-05-10 22:01:07 -04: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-08-07 14:04:01 -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-09-05 08:18:42 -04:00
2017-06-12 20:48:00 -04:00
2017-10-16 23:14:31 -04: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-08-22 22:23:36 -04: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
2016-05-16 11:14:29 -04:00
2017-08-25 17:08:08 -04:00
2017-09-13 10:47:14 -07:00
2017-08-22 16:34:36 +02:00
2017-10-11 13:32:35 -04: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-02 11:10:55 +01: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-02 11:10:55 +01: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-08-25 17:21:11 -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-08-24 22:29:05 -04: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-05-16 08:44:21 -03: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-09-08 18:26:48 -07:00
2017-11-02 11:10:55 +01:00
2017-04-26 15:09:04 -06:00
2017-11-02 11:10:55 +01:00
2017-02-22 18:41:42 -05:00
2017-09-27 21:55:21 -04:00
2017-08-25 17:08:07 -04:00
2017-11-02 11:10:55 +01:00
2017-11-07 09:04:32 -08:00
2017-11-02 11:10:55 +01:00
2017-04-13 13:58:20 -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-10-06 14:48:55 -04:00
2016-04-11 16:57:09 -04:00
2017-11-02 11:10:55 +01:00
2017-10-11 14:33:12 -04:00
2017-10-02 22:23:21 -04:00
2017-08-29 21:51:45 -04:00
2017-02-23 16:57:19 -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
2016-09-15 09:51:14 -04:00
2017-08-16 20:01:31 -04:00
2017-10-02 22:16:25 -04: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-10-17 22:41:11 -04: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-08-30 21:53:13 -04: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-03-06 22:27:33 -05:00
2017-01-11 22:31:03 -05:00
2017-08-25 17:21:10 -04:00
2016-09-01 17:52:01 -07: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