<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/scsi/device_handler, branch v4.7</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.7</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-05-18T01:12:50Z</updated>
<entry>
<title>Merge branch 'fixes' into misc</title>
<updated>2016-05-18T01:12:50Z</updated>
<author>
<name>James Bottomley</name>
<email>James.Bottomley@HansenPartnership.com</email>
</author>
<published>2016-05-18T01:12:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e7ca7f9fa2cda220ba807620c992ce77c33a32ea'/>
<id>urn:sha1:e7ca7f9fa2cda220ba807620c992ce77c33a32ea</id>
<content type='text'>
</content>
</entry>
<entry>
<title>scsi_dh_alua: do not fail for unknown VPD identification</title>
<updated>2016-05-11T01:31:17Z</updated>
<author>
<name>Hannes Reinecke</name>
<email>hare@suse.de</email>
</author>
<published>2016-05-06T08:34:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fe8b9534a0a0356f8a76467e2c561194bdb53c84'/>
<id>urn:sha1:fe8b9534a0a0356f8a76467e2c561194bdb53c84</id>
<content type='text'>
Not every device will return a useable VPD identification, but still
might support ALUA. Rather than disable ALUA support we should be
allowing the device identification to be empty and attach individual
ALUA device handler to each devices.

[mkp: Fixed typo reported by Bart]

Reported-by: Paul Mackerras &lt;paulus@ozlabs.org&gt;
Signed-off-by: Hannes Reinecke &lt;hare@suse.com&gt;
Tested-by: Paul Mackerras &lt;paulus@ozlabs.org&gt;
Reviewed-by: Bart Van Assche &lt;bart.vanassche@sandisk.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_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: Declare local functions static</title>
<updated>2016-04-15T20:53:19Z</updated>
<author>
<name>Bart Van Assche</name>
<email>bart.vanassche@sandisk.com</email>
</author>
<published>2016-04-14T17:27:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1f275f976fdc04bf1bfd06929d10852b1b05decc'/>
<id>urn:sha1:1f275f976fdc04bf1bfd06929d10852b1b05decc</id>
<content type='text'>
This patch avoids that building with W=1 causes gcc to report the
following type of warning:

    no previous prototype for ... [-Wmissing-prototypes]

Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Reviewed-by: Hannes Reinicke &lt;hare@suse.de&gt;
Cc: Hannes Reinecke &lt;hare@suse.de&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: 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: 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>
</feed>
