<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/scsi, branch v5.8</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.8</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-07-21T01:38:20Z</updated>
<entry>
<title>scsi: core: Run queue in case of I/O resource contention failure</title>
<updated>2020-07-21T01:38:20Z</updated>
<author>
<name>Ming Lei</name>
<email>ming.lei@redhat.com</email>
</author>
<published>2020-07-20T02:54:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3f0dcfbcd2e162fc0a11c1f59b7acd42ee45f126'/>
<id>urn:sha1:3f0dcfbcd2e162fc0a11c1f59b7acd42ee45f126</id>
<content type='text'>
I/O requests may be held in scheduler queue because of resource contention.
The starvation scenario was handled properly in the regular completion
path but we failed to account for it during I/O submission. This lead to
the hang captured below. Make sure we run the queue when resource
contention is encountered in the submission path.

[   39.054963] scsi 13:0:0:0: rejecting I/O to dead device
[   39.058700] scsi 13:0:0:0: rejecting I/O to dead device
[   39.087855] sd 13:0:0:1: [sdd] Synchronizing SCSI cache
[   39.088909] scsi 13:0:0:1: rejecting I/O to dead device
[   39.095351] scsi 13:0:0:1: rejecting I/O to dead device
[   39.096962] scsi 13:0:0:1: rejecting I/O to dead device
[  247.021859] INFO: task scsi-stress-rem:813 blocked for more than 122 seconds.
[  247.023258]       Not tainted 5.8.0-rc2 #8
[  247.024069] "echo 0 &gt; /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  247.025331] scsi-stress-rem D    0   813    802 0x00004000
[  247.025334] Call Trace:
[  247.025354]  __schedule+0x504/0x55f
[  247.027987]  schedule+0x72/0xa8
[  247.027991]  blk_mq_freeze_queue_wait+0x63/0x8c
[  247.027994]  ? do_wait_intr_irq+0x7a/0x7a
[  247.027996]  blk_cleanup_queue+0x4b/0xc9
[  247.028000]  __scsi_remove_device+0xf6/0x14e
[  247.028002]  scsi_remove_device+0x21/0x2b
[  247.029037]  sdev_store_delete+0x58/0x7c
[  247.029041]  kernfs_fop_write+0x10d/0x14f
[  247.031281]  vfs_write+0xa2/0xdf
[  247.032670]  ksys_write+0x6b/0xb3
[  247.032673]  do_syscall_64+0x56/0x82
[  247.034053]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[  247.034059] RIP: 0033:0x7f69f39e9008
[  247.036330] Code: Bad RIP value.
[  247.036331] RSP: 002b:00007ffdd8116498 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
[  247.037613] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f69f39e9008
[  247.039714] RDX: 0000000000000002 RSI: 000055cde92a0ab0 RDI: 0000000000000001
[  247.039715] RBP: 000055cde92a0ab0 R08: 000000000000000a R09: 00007f69f3a79e80
[  247.039716] R10: 000000000000000a R11: 0000000000000246 R12: 00007f69f3abb780
[  247.039717] R13: 0000000000000002 R14: 00007f69f3ab6740 R15: 0000000000000002

Link: https://lore.kernel.org/r/20200720025435.812030-1-ming.lei@redhat.com
Cc: linux-block@vger.kernel.org
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Ming Lei &lt;ming.lei@redhat.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: megaraid_sas: Remove undefined ENABLE_IRQ_POLL macro</title>
<updated>2020-07-15T20:16:45Z</updated>
<author>
<name>Chandrakanth Patil</name>
<email>chandrakanth.patil@broadcom.com</email>
</author>
<published>2020-07-15T12:01:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=07d3f04550023395bbf34b99ec7e00fc50d9859f'/>
<id>urn:sha1:07d3f04550023395bbf34b99ec7e00fc50d9859f</id>
<content type='text'>
As the ENABLE_IRQ_POLL macro is undefined, the check for ENABLE_IRQ_POLL
macro in ISR will always be false. This leads to irq polling being
non-functional.

Remove ENABLE_IRQ_POLL check from ISR.

Link: https://lore.kernel.org/r/20200715120153.20512-1-chandrakanth.patil@broadcom.com
Fixes: a6ffd5bf6819 ("scsi: megaraid_sas: Call disable_irq from process IRQ")
Cc: &lt;stable@vger.kernel.org&gt; # v5.3+
Signed-off-by: Chandrakanth Patil &lt;chandrakanth.patil@broadcom.com&gt;
Signed-off-by: Kashyap Desai &lt;kashyap.desai@broadcom.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: dh: Add Fujitsu device to devinfo and dh lists</title>
<updated>2020-07-08T05:16:23Z</updated>
<author>
<name>Steve Schremmer</name>
<email>steve.schremmer@netapp.com</email>
</author>
<published>2020-07-07T17:07:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e094fd346021b820f37188aaa6b502c7490ab5b5'/>
<id>urn:sha1:e094fd346021b820f37188aaa6b502c7490ab5b5</id>
<content type='text'>
Add FUJITSU ETERNUS_AHB

Link: https://lore.kernel.org/r/DM6PR06MB5276CCA765336BD312C4282E8C660@DM6PR06MB5276.namprd06.prod.outlook.com
Signed-off-by: Steve Schremmer &lt;steve.schremmer@netapp.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: mpt3sas: Fix error returns in BRM_status_show</title>
<updated>2020-07-08T03:46:38Z</updated>
<author>
<name>Johannes Thumshirn</name>
<email>johannes.thumshirn@wdc.com</email>
</author>
<published>2020-07-01T13:14:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0fd181456aa0826057adbfb6c79c40f4083cfd75'/>
<id>urn:sha1:0fd181456aa0826057adbfb6c79c40f4083cfd75</id>
<content type='text'>
BRM_status_show() has several error branches, but none of them record the
error in the error return.

Also while at it remove the manual mutex_unlock() of the pci_access_mutex
in case of an ongoing pci error recovery or host removal and jump to the
cleanup label instead.

Note: We can safely jump to out from here as io_unit_pg3 is initialized to
NULL and if it hasn't been allocated, kfree() skips the NULL pointer.

[mkp: compilation warning]

Link: https://lore.kernel.org/r/20200701131454.5255-1-johannes.thumshirn@wdc.com
Reviewed-by: Damien Le Moal &lt;damien.lemoal@wdc.com&gt;
Acked-by: Sreekanth Reddy &lt;sreekanth.reddy@broadcom.com&gt;
Signed-off-by: Johannes Thumshirn &lt;johannes.thumshirn@wdc.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: mpt3sas: Fix unlock imbalance</title>
<updated>2020-07-03T03:18:39Z</updated>
<author>
<name>Damien Le Moal</name>
<email>damien.lemoal@wdc.com</email>
</author>
<published>2020-07-01T08:52:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cb551b8dc079d2ef189145782627c99cb68c0255'/>
<id>urn:sha1:cb551b8dc079d2ef189145782627c99cb68c0255</id>
<content type='text'>
In BRM_status_show(), if the condition "!ioc-&gt;is_warpdrive" tested on entry
to the function is true, a "goto out" is called. This results in unlocking
ioc-&gt;pci_access_mutex without this mutex lock being taken.  This generates
the following splat:

[ 1148.539883] mpt3sas_cm2: BRM_status_show: BRM attribute is only for warpdrive
[ 1148.547184]
[ 1148.548708] =====================================
[ 1148.553501] WARNING: bad unlock balance detected!
[ 1148.558277] 5.8.0-rc3+ #827 Not tainted
[ 1148.562183] -------------------------------------
[ 1148.566959] cat/5008 is trying to release lock (&amp;ioc-&gt;pci_access_mutex) at:
[ 1148.574035] [&lt;ffffffffc070b7a3&gt;] BRM_status_show+0xd3/0x100 [mpt3sas]
[ 1148.580574] but there are no more locks to release!
[ 1148.585524]
[ 1148.585524] other info that might help us debug this:
[ 1148.599624] 3 locks held by cat/5008:
[ 1148.607085]  #0: ffff92aea3e392c0 (&amp;p-&gt;lock){+.+.}-{3:3}, at: seq_read+0x34/0x480
[ 1148.618509]  #1: ffff922ef14c4888 (&amp;of-&gt;mutex){+.+.}-{3:3}, at: kernfs_seq_start+0x2a/0xb0
[ 1148.630729]  #2: ffff92aedb5d7310 (kn-&gt;active#224){.+.+}-{0:0}, at: kernfs_seq_start+0x32/0xb0
[ 1148.643347]
[ 1148.643347] stack backtrace:
[ 1148.655259] CPU: 73 PID: 5008 Comm: cat Not tainted 5.8.0-rc3+ #827
[ 1148.665309] Hardware name: HGST H4060-S/S2600STB, BIOS SE5C620.86B.02.01.0008.031920191559 03/19/2019
[ 1148.678394] Call Trace:
[ 1148.684750]  dump_stack+0x78/0xa0
[ 1148.691802]  lock_release.cold+0x45/0x4a
[ 1148.699451]  __mutex_unlock_slowpath+0x35/0x270
[ 1148.707675]  BRM_status_show+0xd3/0x100 [mpt3sas]
[ 1148.716092]  dev_attr_show+0x19/0x40
[ 1148.723664]  sysfs_kf_seq_show+0x87/0x100
[ 1148.731193]  seq_read+0xbc/0x480
[ 1148.737882]  vfs_read+0xa0/0x160
[ 1148.744514]  ksys_read+0x58/0xd0
[ 1148.751129]  do_syscall_64+0x4c/0xa0
[ 1148.757941]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1148.766240] RIP: 0033:0x7f1230566542
[ 1148.772957] Code: Bad RIP value.
[ 1148.779206] RSP: 002b:00007ffeac1bcac8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
[ 1148.790063] RAX: ffffffffffffffda RBX: 0000000000020000 RCX: 00007f1230566542
[ 1148.800284] RDX: 0000000000020000 RSI: 00007f1223460000 RDI: 0000000000000003
[ 1148.810474] RBP: 00007f1223460000 R08: 00007f122345f010 R09: 0000000000000000
[ 1148.820641] R10: 0000000000000022 R11: 0000000000000246 R12: 0000000000000000
[ 1148.830728] R13: 0000000000000003 R14: 0000000000020000 R15: 0000000000020000

Fix this by returning immediately instead of jumping to the out label.

Link: https://lore.kernel.org/r/20200701085254.51740-1-damien.lemoal@wdc.com
Reviewed-by: Johannes Thumshirn &lt;johannes.thumshirn@wdc.com&gt;
Acked-by: Sreekanth Reddy &lt;sreekanth.reddy@broadcom.com&gt;
Signed-off-by: Damien Le Moal &lt;damien.lemoal@wdc.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: iscsi: Change iSCSI workqueue max_active back to 1</title>
<updated>2020-07-03T03:13:54Z</updated>
<author>
<name>Bob Liu</name>
<email>bob.liu@oracle.com</email>
</author>
<published>2020-07-01T03:07:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1a9826204109acd3f8e926394b16bd4cdc4c5dbb'/>
<id>urn:sha1:1a9826204109acd3f8e926394b16bd4cdc4c5dbb</id>
<content type='text'>
Commit 3ce419662dd4 ("scsi: iscsi: Register sysfs for iscsi workqueue")
enabled 'cpumask' support for iSCSI workqueues. However, it is unnecessary
to set max_active = 2 since 'cpumask' can still be modified when max_active
is 1.

This patch sets max_active to 1 so as to keep the same behaviour as before.

Link: https://lore.kernel.org/r/20200701030745.16897-1-bob.liu@oracle.com
Reviewed-by: Mike Christie &lt;michael.christie@oracle.com&gt;
Signed-off-by: Bob Liu &lt;bob.liu@oracle.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: scsi_transport_spi: Fix function pointer check</title>
<updated>2020-06-30T01:34:35Z</updated>
<author>
<name>Tom Rix</name>
<email>trix@redhat.com</email>
</author>
<published>2020-06-27T13:32:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5aee52c44d9170591df65fafa1cd408acc1225ce'/>
<id>urn:sha1:5aee52c44d9170591df65fafa1cd408acc1225ce</id>
<content type='text'>
clang static analysis flags several null function pointer problems.

drivers/scsi/scsi_transport_spi.c:374:1: warning: Called function pointer is null (null dereference) [core.CallAndMessage]
spi_transport_max_attr(offset, "%d\n");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reviewing the store_spi_store_max macro

	if (i-&gt;f-&gt;set_##field)
		return -EINVAL;

should be

	if (!i-&gt;f-&gt;set_##field)
		return -EINVAL;

Link: https://lore.kernel.org/r/20200627133242.21618-1-trix@redhat.com
Reviewed-by: James Bottomley &lt;jejb@linux.ibm.com&gt;
Signed-off-by: Tom Rix &lt;trix@redhat.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: libfc: Skip additional kref updating work event</title>
<updated>2020-06-27T02:19:35Z</updated>
<author>
<name>Javed Hasan</name>
<email>jhasan@marvell.com</email>
</author>
<published>2020-06-26T09:49:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=823a65409c8990f64c5693af98ce0e7819975cba'/>
<id>urn:sha1:823a65409c8990f64c5693af98ce0e7819975cba</id>
<content type='text'>
When an rport event (RPORT_EV_READY) is updated without work being queued,
avoid taking an additional reference.

This issue was leading to memory leak. Trace from KMEMLEAK tool:

  unreferenced object 0xffff8888259e8780 (size 512):
  comm "kworker/2:1", jiffies 4433237386 (age 113021.971s)
    hex dump (first 32 bytes):
	58 0a ec cf 83 88 ff ff 00 00 00 00 00 00 00 00
	01 00 00 00 08 00 00 00 13 7d f0 1e 0e 00 00 10
  backtrace:
  [&lt;000000006b25760f&gt;] fc_rport_recv_req+0x3c6/0x18f0 [libfc]
  [&lt;00000000f208d994&gt;] fc_lport_recv_els_req+0x120/0x8a0 [libfc]
  [&lt;00000000a9c437b8&gt;] fc_lport_recv+0xb9/0x130 [libfc]
  [&lt;00000000a9c437b8&gt;] fc_lport_recv+0xb9/0x130 [libfc]
  [&lt;00000000ad5be37b&gt;] qedf_ll2_process_skb+0x73d/0xad0 [qedf]
  [&lt;00000000e0eb6893&gt;] process_one_work+0x382/0x6c0
  [&lt;000000002dfd9e21&gt;] worker_thread+0x57/0x5c0
  [&lt;00000000b648204f&gt;] kthread+0x1a0/0x1c0
  [&lt;0000000072f5ab20&gt;] ret_from_fork+0x35/0x40
  [&lt;000000001d5c05d8&gt;] 0xffffffffffffffff

Below is the log sequence which leads to memory leak.  Here we get the
RPORT_EV_READY and RPORT_EV_STOP back to back, which lead to overwrite the
event RPORT_EV_READY by event RPORT_EV_STOP.  Because of this, kref_count
gets incremented by 1.

  kernel: host0: rport fffce5: Received PLOGI request
  kernel: host0: rport fffce5: Received PLOGI in INIT state
  kernel: host0: rport fffce5: Port is Ready
  kernel: host0: rport fffce5: Received PRLI request while in state Ready
  kernel: host0: rport fffce5: PRLI rspp type 8 active 1 passive 0
  kernel: host0: rport fffce5: Received LOGO request while in state Ready
  kernel: host0: rport fffce5: Delete port
  kernel: host0: rport fffce5: Received PLOGI request
  kernel: host0: rport fffce5: Received PLOGI in state Delete - send busy
  kernel: host0: rport fffce5: work event 3
  kernel: host0: rport fffce5: lld callback ev 3
  kernel: host0: rport fffce5: work delete

Link: https://lore.kernel.org/r/20200626094959.32151-1-jhasan@marvell.com
Reviewed-by: Girish Basrur &lt;gbasrur@marvell.com&gt;
Reviewed-by: Saurav Kashyap &lt;skashyap@marvell.com&gt;
Reviewed-by: Shyam Sundar &lt;ssundar@marvell.com&gt;
Signed-off-by: Javed Hasan &lt;jhasan@marvell.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: libfc: Handling of extra kref</title>
<updated>2020-06-27T02:13:48Z</updated>
<author>
<name>Javed Hasan</name>
<email>jhasan@marvell.com</email>
</author>
<published>2020-06-22T10:12:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=71f2bf85e90d938d4a9ef9dd9bfa8d9b0b6a03f7'/>
<id>urn:sha1:71f2bf85e90d938d4a9ef9dd9bfa8d9b0b6a03f7</id>
<content type='text'>
Handling of extra kref which is done by lookup table in case rdata is
already present in list.

This issue was leading to memory leak. Trace from KMEMLEAK tool:

  unreferenced object 0xffff8888259e8780 (size 512):
    comm "kworker/2:1", pid 182614, jiffies 4433237386 (age 113021.971s)
    hex dump (first 32 bytes):
    58 0a ec cf 83 88 ff ff 00 00 00 00 00 00 00 00
    01 00 00 00 08 00 00 00 13 7d f0 1e 0e 00 00 10
  backtrace:
	[&lt;000000006b25760f&gt;] fc_rport_recv_req+0x3c6/0x18f0 [libfc]
	[&lt;00000000f208d994&gt;] fc_lport_recv_els_req+0x120/0x8a0 [libfc]
	[&lt;00000000a9c437b8&gt;] fc_lport_recv+0xb9/0x130 [libfc]
	[&lt;00000000ad5be37b&gt;] qedf_ll2_process_skb+0x73d/0xad0 [qedf]
	[&lt;00000000e0eb6893&gt;] process_one_work+0x382/0x6c0
	[&lt;000000002dfd9e21&gt;] worker_thread+0x57/0x5c0
	[&lt;00000000b648204f&gt;] kthread+0x1a0/0x1c0
	[&lt;0000000072f5ab20&gt;] ret_from_fork+0x35/0x40
	[&lt;000000001d5c05d8&gt;] 0xffffffffffffffff

Below is the log sequence which leads to memory leak. Here we get the
nested "Received PLOGI request" for same port and this request leads to
call the fc_rport_create() twice for the same rport.

	kernel: host1: rport fffce5: Received PLOGI request
	kernel: host1: rport fffce5: Received PLOGI in INIT state
	kernel: host1: rport fffce5: Port is Ready
	kernel: host1: rport fffce5: Received PRLI request while in state Ready
	kernel: host1: rport fffce5: PRLI rspp type 8 active 1 passive 0
	kernel: host1: rport fffce5: Received LOGO request while in state Ready
	kernel: host1: rport fffce5: Delete port
	kernel: host1: rport fffce5: Received PLOGI request
	kernel: host1: rport fffce5: Received PLOGI in state Delete - send busy

Link: https://lore.kernel.org/r/20200622101212.3922-2-jhasan@marvell.com
Reviewed-by: Girish Basrur &lt;gbasrur@marvell.com&gt;
Reviewed-by: Saurav Kashyap &lt;skashyap@marvell.com&gt;
Reviewed-by: Shyam Sundar &lt;ssundar@marvell.com&gt;
Signed-off-by: Javed Hasan &lt;jhasan@marvell.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: qla2xxx: Fix a condition in qla2x00_find_all_fabric_devs()</title>
<updated>2020-06-27T02:08:30Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2020-06-19T14:30:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1fc98aaf7f85fadcca57c4a86ef17e1940cad2d3'/>
<id>urn:sha1:1fc98aaf7f85fadcca57c4a86ef17e1940cad2d3</id>
<content type='text'>
This code doesn't make sense unless the correct "fcport" was found.

Link: https://lore.kernel.org/r/20200619143041.GD267142@mwanda
Fixes: 9dd9686b1419 ("scsi: qla2xxx: Add changes for devloss timeout in driver")
Reviewed-by: Himanshu Madhani &lt;himanshu.madhani@oracle.com&gt;
Reviewed-by: Shyam Sundar &lt;ssundar@marvell.com&gt;
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
</feed>
