<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/scsi/device_handler, branch v4.6</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=v4.6</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.6'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-04-30T16:24:50Z</updated>
<entry>
<title>scsi_dh_alua: uninitialized variable in alua_rtpg()</title>
<updated>2016-04-30T16:24:50Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2016-04-14T18:20:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a4bd85203190990ad808abbd4a5dc848a950002c'/>
<id>urn:sha1:a4bd85203190990ad808abbd4a5dc848a950002c</id>
<content type='text'>
It's possible to use "err" without initializing it.  If it happens to be
a 2 which is SCSI_DH_RETRY then that could cause a bug.  Bart Van Assche
pointed out that we should probably re-initialize it for every iteration
through the retry loop.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Reviewed-by: Hannes Reinicke &lt;hare@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: James Bottomley &lt;jejb@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>scsi_dh_alua: Fix a recently introduced deadlock</title>
<updated>2016-03-30T00:32:02Z</updated>
<author>
<name>Bart Van Assche</name>
<email>bart.vanassche@sandisk.com</email>
</author>
<published>2016-03-28T18:14:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=38c315992338a6c26050477b50700e0f8e08ff96'/>
<id>urn:sha1:38c315992338a6c26050477b50700e0f8e08ff96</id>
<content type='text'>
While retesting the SRP initiator I ran the command "rmmod mlx4_ib"
while I/O was in progress. That command triggers SCSI device removal
indirectly. Avoid that this action triggers the following deadlock:

=================================
[ INFO: inconsistent lock state ]
4.6.0-rc0-dbg+ #2 Tainted: G           O
---------------------------------
inconsistent {IN-SOFTIRQ-W} -&gt; {SOFTIRQ-ON-W} usage.
multipathd/484 [HC0[0]:SC0[0]:HE1:SE1] takes:
 (&amp;(&amp;pg-&gt;lock)-&gt;rlock){+.?...}, at: [&lt;ffffffffa04f50a2&gt;] alua_bus_detach+0x52/0xa0 [scsi_dh_alua]
{IN-SOFTIRQ-W} state was registered at:
  [&lt;ffffffff810a64a9&gt;] __lock_acquire+0x7e9/0x1ad0
  [&lt;ffffffff810a7fd0&gt;] lock_acquire+0x60/0x80
  [&lt;ffffffff8159910e&gt;] _raw_spin_lock_irqsave+0x3e/0x60
  [&lt;ffffffffa04f5131&gt;] alua_rtpg_queue+0x41/0x1d0 [scsi_dh_alua]
  [&lt;ffffffffa04f5531&gt;] alua_check+0xe1/0x220 [scsi_dh_alua]
  [&lt;ffffffffa04f5709&gt;] alua_check_sense+0x99/0xb0 [scsi_dh_alua]
  [&lt;ffffffff813f0d01&gt;] scsi_check_sense+0x71/0x3f0
  [&lt;ffffffff813f2f8b&gt;] scsi_decide_disposition+0x18b/0x1d0
  [&lt;ffffffff813f6e52&gt;] scsi_softirq_done+0x52/0x140
  [&lt;ffffffff812a26f2&gt;] blk_done_softirq+0x52/0x90
  [&lt;ffffffff8105bc1f&gt;] __do_softirq+0x10f/0x230
  [&lt;ffffffff8105bec8&gt;] irq_exit+0xa8/0xb0
  [&lt;ffffffff8101a675&gt;] do_IRQ+0x65/0x110
  [&lt;ffffffff8159a2c9&gt;] ret_from_intr+0x0/0x19
  [&lt;ffffffff811732f1&gt;] kmem_cache_alloc+0x151/0x190
  [&lt;ffffffff8118e534&gt;] create_object+0x34/0x2d0
  [&lt;ffffffff8158eaa6&gt;] kmemleak_alloc_percpu+0x56/0xd0
  [&lt;ffffffff8113ab0d&gt;] pcpu_alloc+0x38d/0x660
  [&lt;ffffffff8113aded&gt;] __alloc_percpu_gfp+0xd/0x10
  [&lt;ffffffff812e56a5&gt;] __percpu_counter_init+0x55/0xb0
  [&lt;ffffffff812b4989&gt;] blkg_alloc+0x79/0x230
  [&lt;ffffffff812b6756&gt;] blkcg_init_queue+0x26/0x1d0
  [&lt;ffffffff81297eed&gt;] blk_alloc_queue_node+0x27d/0x2e0
  [&lt;ffffffffa017766c&gt;] dm_create+0x20c/0x570 [dm_mod]
  [&lt;ffffffffa017e356&gt;] dev_create+0x56/0x2c0 [dm_mod]
  [&lt;ffffffffa017dcae&gt;] ctl_ioctl+0x26e/0x520 [dm_mod]
  [&lt;ffffffffa017df6e&gt;] dm_ctl_ioctl+0xe/0x20 [dm_mod]
  [&lt;ffffffff811aa8ee&gt;] do_vfs_ioctl+0x8e/0x660
  [&lt;ffffffff811aaefc&gt;] SyS_ioctl+0x3c/0x70
  [&lt;ffffffff81599929&gt;] entry_SYSCALL_64_fastpath+0x1c/0xac
irq event stamp: 4290931
hardirqs last  enabled at (4290931): [ 1662.892772]
[&lt;ffffffff81599341&gt;] _raw_spin_unlock_irqrestore+0x31/0x50
hardirqs last disabled at (4290930): [&lt;ffffffff815990e7&gt;] _raw_spin_lock_irqsave+0x17/0x60
softirqs last  enabled at (4290774): [&lt;ffffffff8105bcdb&gt;] __do_softirq+0x1cb/0x230
softirqs last disabled at (4289831): [&lt;ffffffff8105bec8&gt;] irq_exit+0xa8/0xb0

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&amp;(&amp;pg-&gt;lock)-&gt;rlock);
  &lt;Interrupt&gt;
    lock(&amp;(&amp;pg-&gt;lock)-&gt;rlock);

 *** DEADLOCK ***

2 locks held by multipathd/484:
 #0:  (&amp;bdev-&gt;bd_mutex){+.+.+.}, at: [&lt;ffffffff811d1cc3&gt;] __blkdev_put+0x33/0x360
 #1:  (sd_ref_mutex){+.+...}, at: [&lt;ffffffff81400afc&gt;] scsi_disk_put+0x1c/0x40

stack backtrace:
CPU: 6 PID: 484 Comm: multipathd Tainted: G           O    4.6.0-rc0-dbg+ #2
Call Trace:
 [&lt;ffffffff812bd115&gt;] dump_stack+0x67/0x92
 [&lt;ffffffff810a5175&gt;] print_usage_bug+0x215/0x240
 [&lt;ffffffff810a56ea&gt;] mark_lock+0x54a/0x610
 [&lt;ffffffff810a6505&gt;] __lock_acquire+0x845/0x1ad0
 [&lt;ffffffff810a7fd0&gt;] lock_acquire+0x60/0x80
 [&lt;ffffffff81598f23&gt;] _raw_spin_lock+0x33/0x50
 [&lt;ffffffffa04f50a2&gt;] alua_bus_detach+0x52/0xa0 [scsi_dh_alua]
 [&lt;ffffffff813ff6f7&gt;] scsi_dh_release_device+0x17/0x50
 [&lt;ffffffff813fb8da&gt;] scsi_device_dev_release_usercontext+0x2a/0x120
 [&lt;ffffffff810701f0&gt;] execute_in_process_context+0x80/0x90
 [&lt;ffffffff813fb8a7&gt;] scsi_device_dev_release+0x17/0x20
 [&lt;ffffffff813c8cfd&gt;] device_release+0x2d/0x90
 [&lt;ffffffff812bfa8a&gt;] kobject_release+0x7a/0x190
 [&lt;ffffffff812bf946&gt;] kobject_put+0x26/0x50
 [&lt;ffffffff813c8ee2&gt;] put_device+0x12/0x20
 [&lt;ffffffff813edc86&gt;] scsi_device_put+0x26/0x30
 [&lt;ffffffff81400b0d&gt;] scsi_disk_put+0x2d/0x40
 [&lt;ffffffff81400b68&gt;] sd_release+0x48/0xb0
 [&lt;ffffffff811d1f2e&gt;] __blkdev_put+0x29e/0x360
 [&lt;ffffffff811d24b9&gt;] blkdev_put+0x49/0x170
 [&lt;ffffffff811d2600&gt;] blkdev_close+0x20/0x30
 [&lt;ffffffff81198f48&gt;] __fput+0xe8/0x1f0
 [&lt;ffffffff81199089&gt;] ____fput+0x9/0x10
 [&lt;ffffffff81075d9e&gt;] task_work_run+0x6e/0xa0
 [&lt;ffffffff81001119&gt;] exit_to_usermode_loop+0xa9/0xb0
 [&lt;ffffffff81001590&gt;] syscall_return_slowpath+0xb0/0xc0
 [&lt;ffffffff815999b7&gt;] entry_SYSCALL_64_fastpath+0xaa/0xac

Fixes: cb0a168cb6b8 (scsi_dh_alua: update 'access_state' field)
Cc: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Reviewed-by: Laurence Oberman &lt;loberman@redhat.com&gt;
Reviewed-by: Hannes Reinicke &lt;hare@suse.de&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Ewan Milne &lt;emilne@redhat.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi_dh_alua: uninitialized variable in alua_check_vpd()</title>
<updated>2016-03-15T01:04:59Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2016-03-11T11:19:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=100bcb851b8ce09824215cfc2afd661ae8d454c9'/>
<id>urn:sha1:100bcb851b8ce09824215cfc2afd661ae8d454c9</id>
<content type='text'>
The pg_updated variable is support to be set to false at the start but
it is uninitialized.

Fixes: cb0a168cb6b8 ('scsi_dh_alua: update 'access_state' field')
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Reviewed-by: Hannes Reinicke &lt;hare@suse.de&gt;
Reviewed-by: Manoj Kumar &lt;manoj@linux.vnet.ibm.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi_dh_emc: update 'access_state' field</title>
<updated>2016-03-05T22:20:33Z</updated>
<author>
<name>Hannes Reinecke</name>
<email>hare@suse.de</email>
</author>
<published>2016-03-03T06:54:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0323375c8bc5c101c9284856cac19a0b9ece71d4'/>
<id>urn:sha1:0323375c8bc5c101c9284856cac19a0b9ece71d4</id>
<content type='text'>
Update the 'access_state' field of the SCSI device whenever the path
state changes.

Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi_dh_rdac: update 'access_state' field</title>
<updated>2016-03-05T22:18:28Z</updated>
<author>
<name>Hannes Reinecke</name>
<email>hare@suse.de</email>
</author>
<published>2016-03-03T06:54:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1a5dc166cd8843252169f52cb714b324f6d679ef'/>
<id>urn:sha1:1a5dc166cd8843252169f52cb714b324f6d679ef</id>
<content type='text'>
Track attached SCSI devices and update the 'access_state' whenever the
path state of the device changes.

Signed-off-by: Hannes Reinecke &lt;hare@suse.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi_dh_alua: update 'access_state' field</title>
<updated>2016-03-05T22:17:34Z</updated>
<author>
<name>Hannes Reinecke</name>
<email>hare@suse.de</email>
</author>
<published>2016-03-03T06:54:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cb0a168cb6b8f77097d69872349278a17383c38e'/>
<id>urn:sha1:cb0a168cb6b8f77097d69872349278a17383c38e</id>
<content type='text'>
Track attached SCSI devices and update the 'access_state' field whenever
an ALUA state change has been detected.

Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Reviewed-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Reviewed-by: Ewan Milne &lt;emilne@redhat.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi_dh_alua: use common definitions for ALUA state</title>
<updated>2016-03-05T22:16:48Z</updated>
<author>
<name>Hannes Reinecke</name>
<email>hare@suse.de</email>
</author>
<published>2016-03-03T06:54:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5115fc7e2e6be8e082a9ff996cb9f343b0e850fe'/>
<id>urn:sha1:5115fc7e2e6be8e082a9ff996cb9f343b0e850fe</id>
<content type='text'>
scsi_proto.h now contains definitions for the ALUA state, so we don't
have to carry them in the device handler.

Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Reviewed-by: Bart van Assche &lt;bart.vanassche@sandisk.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi_dh_alua: Update version to 2.0</title>
<updated>2016-02-24T02:27:02Z</updated>
<author>
<name>Hannes Reinecke</name>
<email>hare@suse.de</email>
</author>
<published>2016-02-19T08:17:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e79c82cca65b00212e14e82c80392dfc5ae9e574'/>
<id>urn:sha1:e79c82cca65b00212e14e82c80392dfc5ae9e574</id>
<content type='text'>
[mkp: Fixed merge due to patches 20-22 of series being postponed]

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi_dh: add 'rescan' callback</title>
<updated>2016-02-24T02:27:02Z</updated>
<author>
<name>Hannes Reinecke</name>
<email>hare@suse.de</email>
</author>
<published>2016-02-19T08:17:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d3d328919f278eda489a482541583f79987ad0e2'/>
<id>urn:sha1:d3d328919f278eda489a482541583f79987ad0e2</id>
<content type='text'>
If a device needs to be rescanned the device_handler might need
to be rechecked, too.
So add a 'rescan' callback to the device handler and call it
upon scsi_rescan_device(). The rescan callback will be invoked
from the Unit Attention handling of ASC/ASCQ 3F 03
(INQUIRY DATA HAS CHANGED).

Reviewed-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi_dh_alua: Send TEST UNIT READY to poll for transitioning</title>
<updated>2016-02-24T02:27:02Z</updated>
<author>
<name>Hannes Reinecke</name>
<email>hare@suse.de</email>
</author>
<published>2016-02-19T08:17:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9d2c30395213166e0b5614fe97576a789864e5de'/>
<id>urn:sha1:9d2c30395213166e0b5614fe97576a789864e5de</id>
<content type='text'>
Sending a 'REPORT TARGET PORT GROUP' command is a costly operation,
as the array has to gather information about all ports.
So instead of using RTPG to poll for a status update when a port
is in transitioning we should be sending a TEST UNIT READY, and
wait for the sense code to report success.

Reviewed-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Reviewed-by: Ewan Milne &lt;emilne@redhat.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
</feed>
