<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/scsi, 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-05-11T20:17:12Z</updated>
<entry>
<title>Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi</title>
<updated>2016-05-11T20:17:12Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-05-11T20:17:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=685764b108a7e5fe9f5ee213d6a627c1166d7c88'/>
<id>urn:sha1:685764b108a7e5fe9f5ee213d6a627c1166d7c88</id>
<content type='text'>
Pull SCSI fixes from James Bottomley:
 "This is a couple of small fixes: one is a potential uninitialised
  error variable in the alua code, potentially causing spurious failures
  and the other is a problem caused by the conversion of SCSI to
  hostwide tags which resulted in the qla1280 driver always failing in
  host initialisation"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  qla1280: Don't allocate 512kb of host tags
  scsi_dh_alua: uninitialized variable in alua_rtpg()
</content>
</entry>
<entry>
<title>qla1280: Don't allocate 512kb of host tags</title>
<updated>2016-04-30T16:25:26Z</updated>
<author>
<name>Johannes Thumshirn</name>
<email>jthumshirn@suse.de</email>
</author>
<published>2016-04-27T08:48:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2bcbc81421c511ef117cadcf0bee9c4340e68db0'/>
<id>urn:sha1:2bcbc81421c511ef117cadcf0bee9c4340e68db0</id>
<content type='text'>
The qla1280 driver sets the scsi_host_template's can_queue field to 0xfffff
which results in an allocation failure when allocating the block layer tags
for the driver's queues. This was introduced with the change for host wide
tags in commit 64d513ac31b - "scsi: use host wide tags by default".

Reduce can_queue to MAX_OUTSTANDING_COMMANDS (512) to solve the allocation
error.

Signed-off-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Fixes: 64d513ac31b - "scsi: use host wide tags by default"
Cc: stable@vger.kernel.org # v4.4
Cc: Laura Abbott &lt;labbott@redhat.com&gt;
Cc: Michael Reed &lt;mdr@sgi.com&gt;
Reviewed-by: Laurence Oberman &lt;loberman@redhat.com&gt;
Reviewed-by: Lee Duncan &lt;lduncan@suse.com&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: 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>cxgbi: fix uninitialized flowi6</title>
<updated>2016-04-25T20:20:49Z</updated>
<author>
<name>Jiri Benc</name>
<email>jbenc@redhat.com</email>
</author>
<published>2016-04-22T11:09:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3d6d30d60abb19ba9a20e53ce65b18a9c148fcd1'/>
<id>urn:sha1:3d6d30d60abb19ba9a20e53ce65b18a9c148fcd1</id>
<content type='text'>
ip6_route_output looks into different fields in the passed flowi6 structure,
yet cxgbi passes garbage in nearly all those fields. Zero the structure out
first.

Fixes: fc8d0590d9142 ("libcxgbi: Add ipv6 api to driver")
Signed-off-by: Jiri Benc &lt;jbenc@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi</title>
<updated>2016-04-09T19:00:42Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-04-09T19:00:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fb41b4be00270f5b28784a31a458a4dcf4519b9e'/>
<id>urn:sha1:fb41b4be00270f5b28784a31a458a4dcf4519b9e</id>
<content type='text'>
Pull SCSI fixes from James Bottomley:
 "This is a set of eight fixes.

  Two are trivial gcc-6 updates (brace additions and unused variable
  removal).  There's a couple of cxlflash regressions, a correction for
  sd being overly chatty on revalidation (causing excess log increases).
  A VPD issue which could crash USB devices because they seem very
  intolerant to VPD inquiries, an ALUA deadlock fix and a mpt3sas buffer
  overrun fix"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: Do not attach VPD to devices that don't support it
  sd: Fix excessive capacity printing on devices with blocks bigger than 512 bytes
  scsi_dh_alua: Fix a recently introduced deadlock
  scsi: Declare local symbols static
  cxlflash: Move to exponential back-off when cmd_room is not available
  cxlflash: Fix regression issue with re-ordering patch
  mpt3sas: Don't overreach ioc-&gt;reply_post[] during initialization
  aacraid: add missing curly braces
</content>
</entry>
<entry>
<title>Merge branch 'fixes-base' into fixes</title>
<updated>2016-04-05T10:56:47Z</updated>
<author>
<name>James Bottomley</name>
<email>James.Bottomley@HansenPartnership.com</email>
</author>
<published>2016-04-05T10:56:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6ea7e3873e52902af9ee8c0837450fdb69d54140'/>
<id>urn:sha1:6ea7e3873e52902af9ee8c0837450fdb69d54140</id>
<content type='text'>
</content>
</entry>
<entry>
<title>scsi: Do not attach VPD to devices that don't support it</title>
<updated>2016-04-05T10:56:40Z</updated>
<author>
<name>Hannes Reinecke</name>
<email>hare@suse.de</email>
</author>
<published>2016-04-01T06:57:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5ddfe0858ea7848c5d4efe3f4319e7543522e0ee'/>
<id>urn:sha1:5ddfe0858ea7848c5d4efe3f4319e7543522e0ee</id>
<content type='text'>
The patch "scsi: rescan VPD attributes" introduced a regression in which
devices that don't support VPD were being scanned for VPD attributes
anyway.  This could cause issues for some devices and should be avoided
so the check for scsi_level has been moved out of scsi_add_lun and into
scsi_attach_vpd so that all callers will not scan VPD for devices that
don't support it.

[mkp: Merge fix]

Fixes: 09e2b0b14690 ("scsi: rescan VPD attributes")
Cc: &lt;stable@vger.kernel.org&gt; #v4.5+
Suggested-by: Alexander Duyck &lt;aduyck@mirantis.com&gt;
Signed-off-by: Hannes Reinecke &lt;hare@suse.com&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>mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros</title>
<updated>2016-04-04T17:41:08Z</updated>
<author>
<name>Kirill A. Shutemov</name>
<email>kirill.shutemov@linux.intel.com</email>
</author>
<published>2016-04-01T12:29:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=09cbfeaf1a5a67bfb3201e0c83c810cecb2efa5a'/>
<id>urn:sha1:09cbfeaf1a5a67bfb3201e0c83c810cecb2efa5a</id>
<content type='text'>
PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} macros were introduced *long* time
ago with promise that one day it will be possible to implement page
cache with bigger chunks than PAGE_SIZE.

This promise never materialized.  And unlikely will.

We have many places where PAGE_CACHE_SIZE assumed to be equal to
PAGE_SIZE.  And it's constant source of confusion on whether
PAGE_CACHE_* or PAGE_* constant should be used in a particular case,
especially on the border between fs and mm.

Global switching to PAGE_CACHE_SIZE != PAGE_SIZE would cause to much
breakage to be doable.

Let's stop pretending that pages in page cache are special.  They are
not.

The changes are pretty straight-forward:

 - &lt;foo&gt; &lt;&lt; (PAGE_CACHE_SHIFT - PAGE_SHIFT) -&gt; &lt;foo&gt;;

 - &lt;foo&gt; &gt;&gt; (PAGE_CACHE_SHIFT - PAGE_SHIFT) -&gt; &lt;foo&gt;;

 - PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} -&gt; PAGE_{SIZE,SHIFT,MASK,ALIGN};

 - page_cache_get() -&gt; get_page();

 - page_cache_release() -&gt; put_page();

This patch contains automated changes generated with coccinelle using
script below.  For some reason, coccinelle doesn't patch header files.
I've called spatch for them manually.

The only adjustment after coccinelle is revert of changes to
PAGE_CAHCE_ALIGN definition: we are going to drop it later.

There are few places in the code where coccinelle didn't reach.  I'll
fix them manually in a separate patch.  Comments and documentation also
will be addressed with the separate patch.

virtual patch

@@
expression E;
@@
- E &lt;&lt; (PAGE_CACHE_SHIFT - PAGE_SHIFT)
+ E

@@
expression E;
@@
- E &gt;&gt; (PAGE_CACHE_SHIFT - PAGE_SHIFT)
+ E

@@
@@
- PAGE_CACHE_SHIFT
+ PAGE_SHIFT

@@
@@
- PAGE_CACHE_SIZE
+ PAGE_SIZE

@@
@@
- PAGE_CACHE_MASK
+ PAGE_MASK

@@
expression E;
@@
- PAGE_CACHE_ALIGN(E)
+ PAGE_ALIGN(E)

@@
expression E;
@@
- page_cache_get(E)
+ get_page(E)

@@
expression E;
@@
- page_cache_release(E)
+ put_page(E)

Signed-off-by: Kirill A. Shutemov &lt;kirill.shutemov@linux.intel.com&gt;
Acked-by: Michal Hocko &lt;mhocko@suse.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>sd: Fix excessive capacity printing on devices with blocks bigger than 512 bytes</title>
<updated>2016-04-01T00:59:08Z</updated>
<author>
<name>Martin K. Petersen</name>
<email>martin.petersen@oracle.com</email>
</author>
<published>2016-03-29T01:18:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f08bb1e0dbdd0297258d0b8cd4dbfcc057e57b2a'/>
<id>urn:sha1:f08bb1e0dbdd0297258d0b8cd4dbfcc057e57b2a</id>
<content type='text'>
During revalidate we check whether device capacity has changed before we
decide whether to output disk information or not.

The check for old capacity failed to take into account that we scaled
sdkp-&gt;capacity based on the reported logical block size. And therefore
the capacity test would always fail for devices with sectors bigger than
512 bytes and we would print several copies of the same discovery
information.

Avoid scaling sdkp-&gt;capacity and instead adjust the value on the fly
when setting the block device capacity and generating fake C/H/S
geometry.

Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Reported-by: Hannes Reinecke &lt;hare@suse.de&gt;
Reviewed-by: Hannes Reinicke &lt;hare@suse.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: 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>
</feed>
