<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/scsi, 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-07-06T14:25:55Z</updated>
<entry>
<title>Merge branch 'jejb-fixes' into fixes</title>
<updated>2016-07-06T14:25:55Z</updated>
<author>
<name>James Bottomley</name>
<email>James.Bottomley@HansenPartnership.com</email>
</author>
<published>2016-07-06T14:25:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ea1a25c3348abc33d7d94db28501766adf3d1c7d'/>
<id>urn:sha1:ea1a25c3348abc33d7d94db28501766adf3d1c7d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>qla2xxx: Fix NULL pointer deref in QLA interrupt</title>
<updated>2016-07-05T19:42:54Z</updated>
<author>
<name>Bruno PrÃ©mont</name>
<email>bonbons@linux-vserver.org</email>
</author>
<published>2016-06-30T15:00:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=262e2bfd7d1e1f1ee48b870e5dfabb87c06b975e'/>
<id>urn:sha1:262e2bfd7d1e1f1ee48b870e5dfabb87c06b975e</id>
<content type='text'>
In qla24xx_process_response_queue() rsp-&gt;msix-&gt;cpuid may trigger NULL
pointer dereference when rsp-&gt;msix is NULL:

[    5.622457] NULL pointer dereference at 0000000000000050
[    5.622457] IP: [&lt;ffffffff8155e614&gt;] qla24xx_process_response_queue+0x44/0x4b0
[    5.622457] PGD 0
[    5.622457] Oops: 0000 [#1] SMP
[    5.622457] Modules linked in:
[    5.622457] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.6.3-x86_64 #1
[    5.622457] Hardware name: HP ProLiant DL360 G5, BIOS P58 05/02/2011
[    5.622457] task: ffff8801a88f3740 ti: ffff8801a8954000 task.ti: ffff8801a8954000
[    5.622457] RIP: 0010:[&lt;ffffffff8155e614&gt;]  [&lt;ffffffff8155e614&gt;] qla24xx_process_response_queue+0x44/0x4b0
[    5.622457] RSP: 0000:ffff8801afb03de8  EFLAGS: 00010002
[    5.622457] RAX: 0000000000000000 RBX: 0000000000000032 RCX: 00000000ffffffff
[    5.622457] RDX: 0000000000000002 RSI: ffff8801a79bf8c8 RDI: ffff8800c8f7e7c0
[    5.622457] RBP: ffff8801afb03e68 R08: 0000000000000000 R09: 0000000000000000
[    5.622457] R10: 00000000ffff8c47 R11: 0000000000000002 R12: ffff8801a79bf8c8
[    5.622457] R13: ffff8800c8f7e7c0 R14: ffff8800c8f60000 R15: 0000000000018013
[    5.622457] FS:  0000000000000000(0000) GS:ffff8801afb00000(0000) knlGS:0000000000000000
[    5.622457] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    5.622457] CR2: 0000000000000050 CR3: 0000000001e07000 CR4: 00000000000006e0
[    5.622457] Stack:
[    5.622457]  ffff8801afb03e30 ffffffff810c0f2d 0000000000000086 0000000000000002
[    5.622457]  ffff8801afb03e28 ffffffff816570e1 ffff8800c8994628 0000000000000002
[    5.622457]  ffff8801afb03e60 ffffffff816772d4 b47c472ad6955e68 0000000000000032
[    5.622457] Call Trace:
[    5.622457]  &lt;IRQ&gt;
[    5.622457]  [&lt;ffffffff810c0f2d&gt;] ? __wake_up_common+0x4d/0x80
[    5.622457]  [&lt;ffffffff816570e1&gt;] ? usb_hcd_resume_root_hub+0x51/0x60
[    5.622457]  [&lt;ffffffff816772d4&gt;] ? uhci_hub_status_data+0x64/0x240
[    5.622457]  [&lt;ffffffff81560d00&gt;] qla24xx_intr_handler+0xf0/0x2e0
[    5.622457]  [&lt;ffffffff810d569e&gt;] ? get_next_timer_interrupt+0xce/0x200
[    5.622457]  [&lt;ffffffff810c89b4&gt;] handle_irq_event_percpu+0x64/0x100
[    5.622457]  [&lt;ffffffff810c8a77&gt;] handle_irq_event+0x27/0x50
[    5.622457]  [&lt;ffffffff810cb965&gt;] handle_edge_irq+0x65/0x140
[    5.622457]  [&lt;ffffffff8101a498&gt;] handle_irq+0x18/0x30
[    5.622457]  [&lt;ffffffff8101a276&gt;] do_IRQ+0x46/0xd0
[    5.622457]  [&lt;ffffffff817f8fff&gt;] common_interrupt+0x7f/0x7f
[    5.622457]  &lt;EOI&gt;
[    5.622457]  [&lt;ffffffff81020d38&gt;] ? mwait_idle+0x68/0x80
[    5.622457]  [&lt;ffffffff8102114a&gt;] arch_cpu_idle+0xa/0x10
[    5.622457]  [&lt;ffffffff810c1b97&gt;] default_idle_call+0x27/0x30
[    5.622457]  [&lt;ffffffff810c1d3b&gt;] cpu_startup_entry+0x19b/0x230
[    5.622457]  [&lt;ffffffff810324c6&gt;] start_secondary+0x136/0x140
[    5.622457] Code: 00 00 65 48 8b 04 25 28 00 00 00 48 89 45 d0 31 c0 48 8b 47 58 a8 02 0f 84 c5 00 00 00 48 8b 46 50 49 89 f4 65 8b 15 34 bb aa 7e &lt;39&gt; 50 50 74 11 89 50 50 48 8b 46 50 8b 40 50 41 89 86 60 8b 00
[    5.622457] RIP  [&lt;ffffffff8155e614&gt;] qla24xx_process_response_queue+0x44/0x4b0
[    5.622457]  RSP &lt;ffff8801afb03de8&gt;
[    5.622457] CR2: 0000000000000050
[    5.622457] ---[ end trace fa2b19c25106d42b ]---
[    5.622457] Kernel panic - not syncing: Fatal exception in interrupt

The affected code was introduced by commit cdb898c52d1dfad4b4800b83a58b3fe5d352edde
(qla2xxx: Add irq affinity notification).

Only dereference rsp-&gt;msix when it has been set so the machine can boot
fine. Possibly rsp-&gt;msix is unset because:
[    3.479679] qla2xxx [0000:00:00.0]-0005: : QLogic Fibre Channel HBA Driver: 8.07.00.33-k.
[    3.481839] qla2xxx [0000:13:00.0]-001d: : Found an ISP2432 irq 17 iobase 0xffffc90000038000.
[    3.484081] qla2xxx [0000:13:00.0]-0035:0: MSI-X; Unsupported ISP2432 (0x2, 0x3).
[    3.485804] qla2xxx [0000:13:00.0]-0037:0: Falling back-to MSI mode -258.
[    3.890145] scsi host0: qla2xxx
[    3.891956] qla2xxx [0000:13:00.0]-00fb:0: QLogic QLE2460 - PCI-Express Single Channel 4Gb Fibre Channel HBA.
[    3.894207] qla2xxx [0000:13:00.0]-00fc:0: ISP2432: PCIe (2.5GT/s x4) @ 0000:13:00.0 hdma+ host#=0 fw=7.03.00 (9496).
[    5.714774] qla2xxx [0000:13:00.0]-500a:0: LOOP UP detected (4 Gbps).

Signed-off-by: Bruno Prémont &lt;bonbons@linux-vserver.org&gt;
Acked-by: Quinn Tran &lt;quinn.tran@qlogic.com&gt;
CC: &lt;stable@vger.kernel.org&gt;  # 4.5+
Fixes: cdb898c52d1dfad4b4800b83a58b3fe5d352edde
Signed-off-by: James Bottomley &lt;jejb@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>SCSI: fix new bug in scsi_dev_info_list string matching</title>
<updated>2016-06-29T04:51:31Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2016-06-23T19:05:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5e7ff2ca7f2da55fe777167849d0c93403bd0dc8'/>
<id>urn:sha1:5e7ff2ca7f2da55fe777167849d0c93403bd0dc8</id>
<content type='text'>
Commit b704f70ce200 ("SCSI: fix bug in scsi_dev_info_list matching")
changed the way vendor- and model-string matching was carried out in the
routine that looks up entries in a SCSI devinfo list.  The new matching
code failed to take into account the case of a maximum-length string; in
such cases it could end up testing for a terminating '\0' byte beyond
the end of the memory allocated to the string.  This out-of-bounds bug
was detected by UBSAN.

I don't know if anybody has actually encountered this bug.  The symptom
would be that a device entry in the blacklist might not be matched
properly if it contained an 8-character vendor name or a 16-character
model name.  Such entries certainly exist in scsi_static_device_list.

This patch fixes the problem by adding a check for a maximum-length
string before the '\0' test.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Fixes: b704f70ce200 ("SCSI: fix bug in scsi_dev_info_list matching")
Tested-by: Wilfried Klaebe &lt;linux-kernel@lebenslange-mailadresse.de&gt;
CC: &lt;stable@vger.kernel.org&gt; # v4.4+
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>ipr: Clear interrupt on croc/crocodile when running with LSI</title>
<updated>2016-06-29T04:47:18Z</updated>
<author>
<name>Brian King</name>
<email>brking@linux.vnet.ibm.com</email>
</author>
<published>2016-06-27T14:09:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=54e430bbd490e18ab116afa4cd90dcc45787b3df'/>
<id>urn:sha1:54e430bbd490e18ab116afa4cd90dcc45787b3df</id>
<content type='text'>
If we fall back to using LSI on the Croc or Crocodile chip we need to
clear the interrupt so we don't hang the system.

Cc: &lt;stable@vger.kernel.org&gt;
Tested-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Brian King &lt;brking@linux.vnet.ibm.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'mkp-scsi/4.7/scsi-fixes' into fixes</title>
<updated>2016-06-18T18:59:01Z</updated>
<author>
<name>James Bottomley</name>
<email>James.Bottomley@HansenPartnership.com</email>
</author>
<published>2016-06-18T18:59:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=951d77fd5a541d68eeb7372e72cd4757e3058517'/>
<id>urn:sha1:951d77fd5a541d68eeb7372e72cd4757e3058517</id>
<content type='text'>
</content>
</entry>
<entry>
<title>53c700: fix BUG on untagged commands</title>
<updated>2016-06-15T01:17:22Z</updated>
<author>
<name>James Bottomley</name>
<email>jejb@linux.vnet.ibm.com</email>
</author>
<published>2016-06-14T05:00:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8beb330044d0d1878c7b92290e91c0b889e92633'/>
<id>urn:sha1:8beb330044d0d1878c7b92290e91c0b889e92633</id>
<content type='text'>
The untagged command case in the 53c700 driver has been broken since
host wide tags were enabled because the replaced scsi_find_tag()
function had a special case for the tag value SCSI_NO_TAG to retrieve
sdev-&gt;current_cmnd.  The replacement function scsi_host_find_tag() has
no such special case and returns NULL causing untagged commands to
trigger a BUG() in the driver.  Inspection shows that the 53c700 is the
only driver using this SCSI_NO_TAG case, so a local fix in the driver
suffices to fix this problem globally.

Fixes: 64d513ac31b - "scsi: use host wide tags by default"
Cc: stable@vger.kernel.org	# 4.4+
Reported-by: Helge Deller &lt;deller@gmx.de&gt;
Tested-by: Helge Deller &lt;deller@gmx.de&gt;
Signed-off-by: James Bottomley &lt;jejb@linux.vnet.ibm.com&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Reviewed-by: Ewan D. Milne &lt;emilne@redhat.com&gt;
Acked-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: fix race between simultaneous decrements of -&gt;host_failed</title>
<updated>2016-06-09T03:08:04Z</updated>
<author>
<name>Wei Fang</name>
<email>fangwei1@huawei.com</email>
</author>
<published>2016-06-07T06:53:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=72d8c36ec364c82bf1bf0c64dfa1041cfaf139f7'/>
<id>urn:sha1:72d8c36ec364c82bf1bf0c64dfa1041cfaf139f7</id>
<content type='text'>
sas_ata_strategy_handler() adds the works of the ata error handler to
system_unbound_wq. This workqueue asynchronously runs work items, so the
ata error handler will be performed concurrently on different CPUs. In
this case, -&gt;host_failed will be decreased simultaneously in
scsi_eh_finish_cmd() on different CPUs, and become abnormal.

It will lead to permanently inequality between -&gt;host_failed and
-&gt;host_busy, and scsi error handler thread won't start running. IO
errors after that won't be handled.

Since all scmds must have been handled in the strategy handler, just
remove the decrement in scsi_eh_finish_cmd() and zero -&gt;host_busy after
the strategy handler to fix this race.

Fixes: 50824d6c5657 ("[SCSI] libsas: async ata-eh")
Cc: stable@vger.kernel.org
Signed-off-by: Wei Fang &lt;fangwei1@huawei.com&gt;
Reviewed-by: James Bottomley &lt;jejb@linux.vnet.ibm.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'mkp-scsi/4.7/scsi-fixes' into fixes</title>
<updated>2016-06-04T13:53:29Z</updated>
<author>
<name>James Bottomley</name>
<email>James.Bottomley@HansenPartnership.com</email>
</author>
<published>2016-06-04T13:53:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=27ea13e6186c1a5bd0fa2b0d6f854d60ca4ca4c9'/>
<id>urn:sha1:27ea13e6186c1a5bd0fa2b0d6f854d60ca4ca4c9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>sd: Fix rw_max for devices that report an optimal xfer size</title>
<updated>2016-06-02T02:07:47Z</updated>
<author>
<name>Martin K. Petersen</name>
<email>martin.petersen@oracle.com</email>
</author>
<published>2016-05-13T02:17:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6b7e9cde49691e04314342b7dce90c67ad567fcc'/>
<id>urn:sha1:6b7e9cde49691e04314342b7dce90c67ad567fcc</id>
<content type='text'>
For historic reasons, io_opt is in bytes and max_sectors in block layer
sectors. This interface inconsistency is error prone and should be
fixed. But for 4.4--4.7 let's make the unit difference explicit via a
wrapper function.

Fixes: d0eb20a863ba ("sd: Optimal I/O size is in bytes, not sectors")
Cc: stable@vger.kernel.org # 4.4+
Reported-by: Fam Zheng &lt;famz@redhat.com&gt;
Reviewed-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Tested-by: Andrew Patterson &lt;andrew.patterson@hpe.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: Add QEMU CD-ROM to VPD Inquiry Blacklist</title>
<updated>2016-06-01T02:46:53Z</updated>
<author>
<name>Ewan D. Milne</name>
<email>emilne@redhat.com</email>
</author>
<published>2016-05-31T13:42:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fbd83006e3e536fcb103228d2422ea63129ccb03'/>
<id>urn:sha1:fbd83006e3e536fcb103228d2422ea63129ccb03</id>
<content type='text'>
Linux fails to boot as a guest with a QEMU CD-ROM:

[    4.439488] ata2.00: ATAPI: QEMU CD-ROM, 0.8.2, max UDMA/100
[    4.443649] ata2.00: configured for MWDMA2
[    4.450267] scsi 1:0:0:0: CD-ROM            QEMU     QEMU CD-ROM      0.8. PQ: 0 ANSI: 5
[    4.464317] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[    4.464319] ata2.00: BMDMA stat 0x5
[    4.464339] ata2.00: cmd a0/01:00:00:00:01/00:00:00:00:00/a0 tag 0 dma 16640 in
[    4.464339]          Inquiry 12 01 00 00 ff 00res 48/20:02:00:24:00/00:00:00:00:00/a0 Emask 0x2 (HSM violation)
[    4.464341] ata2.00: status: { DRDY DRQ }
[    4.465864] ata2: soft resetting link
[    4.625971] ata2.00: configured for MWDMA2
[    4.628290] ata2: EH complete
[    4.646670] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
[    4.646671] ata2.00: BMDMA stat 0x5
[    4.646683] ata2.00: cmd a0/01:00:00:00:01/00:00:00:00:00/a0 tag 0 dma 16640 in
[    4.646683]          Inquiry 12 01 00 00 ff 00res 48/20:02:00:24:00/00:00:00:00:00/a0 Emask 0x2 (HSM violation)
[    4.646685] ata2.00: status: { DRDY DRQ }
[    4.648193] ata2: soft resetting link

...

Fix this by suppressing VPD inquiry for this device.

Signed-off-by: Ewan D. Milne &lt;emilne@redhat.com&gt;
Reported-by: Jan Stancek &lt;jstancek@redhat.com&gt;
Tested-by: Jan Stancek &lt;jstancek@redhat.com&gt;
Cc: &lt;stable@vger.kernel.org&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>
