Files
linux/include/linux
Bart Van Assche 7d4f2fa495 Defer processing of REQ_PREEMPT requests for blocked devices
commit bba0bdd7ad upstream.

SCSI transport drivers and SCSI LLDs block a SCSI device if the
transport layer is not operational. This means that in this state
no requests should be processed, even if the REQ_PREEMPT flag has
been set. This patch avoids that a rescan shortly after a cable
pull sporadically triggers the following kernel oops:

BUG: unable to handle kernel paging request at ffffc9001a6bc084
IP: [<ffffffffa04e08f2>] mlx4_ib_post_send+0xd2/0xb30 [mlx4_ib]
Process rescan-scsi-bus (pid: 9241, threadinfo ffff88053484a000, task ffff880534aae100)
Call Trace:
 [<ffffffffa0718135>] srp_post_send+0x65/0x70 [ib_srp]
 [<ffffffffa071b9df>] srp_queuecommand+0x1cf/0x3e0 [ib_srp]
 [<ffffffffa0001ff1>] scsi_dispatch_cmd+0x101/0x280 [scsi_mod]
 [<ffffffffa0009ad1>] scsi_request_fn+0x411/0x4d0 [scsi_mod]
 [<ffffffff81223b37>] __blk_run_queue+0x27/0x30
 [<ffffffff8122a8d2>] blk_execute_rq_nowait+0x82/0x110
 [<ffffffff8122a9c2>] blk_execute_rq+0x62/0xf0
 [<ffffffffa000b0e8>] scsi_execute+0xe8/0x190 [scsi_mod]
 [<ffffffffa000b2f3>] scsi_execute_req+0xa3/0x130 [scsi_mod]
 [<ffffffffa000c1aa>] scsi_probe_lun+0x17a/0x450 [scsi_mod]
 [<ffffffffa000ce86>] scsi_probe_and_add_lun+0x156/0x480 [scsi_mod]
 [<ffffffffa000dc2f>] __scsi_scan_target+0xdf/0x1f0 [scsi_mod]
 [<ffffffffa000dfa3>] scsi_scan_host_selected+0x183/0x1c0 [scsi_mod]
 [<ffffffffa000edfb>] scsi_scan+0xdb/0xe0 [scsi_mod]
 [<ffffffffa000ee13>] store_scan+0x13/0x20 [scsi_mod]
 [<ffffffff811c8d9b>] sysfs_write_file+0xcb/0x160
 [<ffffffff811589de>] vfs_write+0xce/0x140
 [<ffffffff81158b53>] sys_write+0x53/0xa0
 [<ffffffff81464592>] system_call_fastpath+0x16/0x1b
 [<00007f611c9d9300>] 0x7f611c9d92ff

Reported-by: Max Gurtuvoy <maxg@mellanox.com>
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-19 10:11:07 +02:00
..
2013-08-14 13:55:15 +05:30
2013-03-01 13:39:00 -08:00
2014-01-20 11:55:23 -08:00
2014-01-24 22:39:54 +01:00
2014-06-30 20:11:58 -07:00
2013-07-30 11:53:12 -04:00
2013-05-29 15:50:34 -04:00
2012-10-08 13:50:20 +10:30
2012-12-02 00:05:12 +00:00
2014-05-06 07:59:36 -07:00
2013-12-22 23:14:27 -08:00
2014-10-30 09:38:24 -07:00
2013-11-15 09:32:21 +09:00
2013-11-09 00:16:29 -05:00
2013-03-12 11:30:04 -07:00
2014-09-17 09:19:27 -07:00
2014-02-13 10:08:52 +05:30
2012-09-30 18:02:20 -07:00
2012-10-16 18:49:15 -07:00
2013-07-15 11:25:00 +09:30
2013-05-07 18:38:27 -07:00
2014-01-16 10:23:02 +10:30
2013-04-29 18:28:40 -07:00
2014-03-10 11:44:42 -04:00
2013-06-17 16:38:57 -07:00
2013-08-22 22:13:54 -07:00
2014-03-10 11:44:42 -04:00
2014-11-14 09:00:06 -08:00
2015-01-29 17:40:52 -08:00
2014-01-16 11:15:50 +01:00
2014-01-26 22:48:35 +01:00
2013-06-13 17:51:04 -07:00
2014-06-26 15:15:39 -04:00
2013-12-29 16:34:25 -05:00
2013-12-10 22:58:13 -08:00
2013-06-17 16:38:57 -07:00
2013-09-13 15:09:52 +02:00
2013-08-09 10:49:00 +02:00
2013-07-26 16:19:48 -07:00
2012-05-31 17:49:32 -07:00
2014-02-25 07:37:52 -08:00
2013-11-15 09:32:23 +09:00
2013-04-30 17:04:06 -07:00
2013-08-28 21:35:14 -07:00
2014-01-08 19:03:00 -02:00
2013-04-01 11:04:50 -07:00
2013-05-31 00:48:22 -07:00
2013-12-11 15:52:34 +01:00
2013-12-26 13:29:35 -05:00
2013-12-19 10:17:11 -07:00
2014-10-09 12:21:29 -07:00
2014-01-16 10:23:03 +10:30
2014-01-27 21:02:39 -08:00
2013-11-09 00:16:19 -05:00
2013-07-03 16:08:05 -07:00
2013-10-14 17:15:48 +02:00
2014-01-25 03:14:05 -05:00
2012-12-11 17:22:27 -08:00
2013-05-04 14:47:26 -04:00
2014-01-27 19:27:53 -05:00
2014-01-13 14:29:49 -08:00
2014-01-03 11:22:21 -08:00
2013-06-12 12:37:30 +01:00
2012-07-31 18:42:43 -07:00
2014-01-22 19:36:57 +01:00
2014-10-09 12:21:27 -07:00
2013-10-17 00:36:06 +02:00
2014-05-31 13:20:28 -07:00
2013-06-21 11:32:51 +02:00
2013-12-18 19:04:50 -08:00
2013-04-12 10:26:23 +02:00
2013-07-03 16:08:05 -07:00
2012-10-06 03:05:01 +09:00
2014-01-28 13:20:09 -08:00
2013-06-17 16:38:57 -07:00
2013-12-19 19:09:38 -05:00
2014-01-27 21:02:39 -08:00
2013-09-10 18:56:32 -04:00
2013-04-30 15:50:12 +05:30
2012-08-21 16:28:31 +02:00
2012-10-09 16:22:32 +09:00
2012-07-22 23:57:55 +04:00
2013-12-08 16:56:05 -08:00
2014-04-26 17:19:04 -07:00
2013-03-20 12:10:38 -04:00
2013-08-05 10:52:36 -06:00
2014-10-09 12:21:29 -07:00
2013-05-27 10:57:53 +09:00
2013-10-17 15:53:09 -04:00
2013-07-10 18:11:34 -07:00
2014-01-30 16:56:55 -08:00