<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/scsi, branch v3.1</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=v3.1</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2011-10-02T18:28:55Z</updated>
<entry>
<title>[SCSI] libsas: fix panic when single phy is disabled on a wide port</title>
<updated>2011-10-02T18:28:55Z</updated>
<author>
<name>Mark Salyzyn</name>
<email>mark_salyzyn@us.xyratex.com</email>
</author>
<published>2011-09-22T15:32:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a73914c35b05d80f8ce78288e10056c91090b666'/>
<id>urn:sha1:a73914c35b05d80f8ce78288e10056c91090b666</id>
<content type='text'>
When a wide port is being utilized to a target, if one disables only one
of the
phys, we get an OS crash:

BUG: unable to handle kernel NULL pointer dereference at
0000000000000238
IP: [&lt;ffffffff814ca9b1&gt;] mutex_lock+0x21/0x50
PGD 4103f5067 PUD 41dba9067 PMD 0
Oops: 0002 [#1] SMP
last sysfs file: /sys/bus/pci/slots/5/address
CPU 0
Modules linked in: pm8001(U) ses enclosure fuse nfsd exportfs autofs4
ipmi_devintf ipmi_si ipmi_msghandler nfs lockd fscache nfs_acl
auth_rpcgss 8021q fcoe libfcoe garp libfc scsi_transport_fc stp scsi_tgt
llc sunrpc cpufreq_ondemand acpi_cpufreq freq_table ipv6 sr_mod cdrom
dm_mirror dm_region_hash dm_log uinput sg i2c_i801 i2c_core iTCO_wdt
iTCO_vendor_support e1000e mlx4_ib ib_mad ib_core mlx4_en mlx4_core ext3
jbd mbcache sd_mod crc_t10dif usb_storage ata_generic pata_acpi ata_piix
libsas(U) scsi_transport_sas dm_mod [last unloaded: pm8001]

Modules linked in: pm8001(U) ses enclosure fuse nfsd exportfs autofs4
ipmi_devintf ipmi_si ipmi_msghandler nfs lockd fscache nfs_acl
auth_rpcgss 8021q fcoe libfcoe garp libfc scsi_transport_fc stp scsi_tgt
llc sunrpc cpufreq_ondemand acpi_cpufreq freq_table ipv6 sr_mod cdrom
dm_mirror dm_region_hash dm_log uinput sg i2c_i801 i2c_core iTCO_wdt
iTCO_vendor_support e1000e mlx4_ib ib_mad ib_core mlx4_en mlx4_core ext3
jbd mbcache sd_mod crc_t10dif usb_storage ata_generic pata_acpi ata_piix
libsas(U) scsi_transport_sas dm_mod [last unloaded: pm8001]
Pid: 5146, comm: scsi_wq_5 Not tainted
2.6.32-71.29.1.el6.lustre.7.x86_64 #1 Storage Server
RIP: 0010:[&lt;ffffffff814ca9b1&gt;]  [&lt;ffffffff814ca9b1&gt;]
mutex_lock+0x21/0x50
RSP: 0018:ffff8803e4e33d30  EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000000000000238 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffff8803e664c800 RDI: 0000000000000238
RBP: ffff8803e4e33d40 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000
R13: 0000000000000238 R14: ffff88041acb7200 R15: ffff88041c51ada0
FS:  0000000000000000(0000) GS:ffff880028200000(0000)
knlGS:0000000000000000
CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
CR2: 0000000000000238 CR3: 0000000410143000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process scsi_wq_5 (pid: 5146, threadinfo ffff8803e4e32000, task
ffff8803e4e294a0)
Stack:
 ffff8803e664c800 0000000000000000 ffff8803e4e33d70 ffffffffa001f06e
&lt;0&gt; ffff8803e4e33d60 ffff88041c51ada0 ffff88041acb7200 ffff88041bc0aa00
&lt;0&gt; ffff8803e4e33d90 ffffffffa0032b6c 0000000000000014 ffff88041acb7200
Call Trace:
 [&lt;ffffffffa001f06e&gt;] sas_port_delete_phy+0x2e/0xa0 [scsi_transport_sas]
 [&lt;ffffffffa0032b6c&gt;] sas_unregister_devs_sas_addr+0xac/0xe0 [libsas]
 [&lt;ffffffffa0034914&gt;] sas_ex_revalidate_domain+0x204/0x330 [libsas]
 [&lt;ffffffffa00307f0&gt;] ? sas_revalidate_domain+0x0/0x90 [libsas]
 [&lt;ffffffffa0030855&gt;] sas_revalidate_domain+0x65/0x90 [libsas]
 [&lt;ffffffff8108c7d0&gt;] worker_thread+0x170/0x2a0
 [&lt;ffffffff81091ea0&gt;] ? autoremove_wake_function+0x0/0x40
 [&lt;ffffffff8108c660&gt;] ? worker_thread+0x0/0x2a0
 [&lt;ffffffff81091b36&gt;] kthread+0x96/0xa0
 [&lt;ffffffff810141ca&gt;] child_rip+0xa/0x20
 [&lt;ffffffff81091aa0&gt;] ? kthread+0x0/0xa0
 [&lt;ffffffff810141c0&gt;] ? child_rip+0x0/0x20
Code: ff ff 85 c0 75 ed eb d6 66 90 55 48 89 e5 48 83 ec 10 48 89 1c 24
4c 89 64 24 08 0f 1f 44 00 00 48 89 fb e8 92 f4 ff ff 48 89 df &lt;f0&gt; ff
0f 79 05 e8 25 00 00 00 65 48 8b 04 25 08 cc 00 00 48 2d
RIP  [&lt;ffffffff814ca9b1&gt;] mutex_lock+0x21/0x50
 RSP &lt;ffff8803e4e33d30&gt;
CR2: 0000000000000238

The following patch is admittedly a band-aid, and does not solve the
root cause, but it still is a good candidate for hardening as a pointer
check before reference.

Signed-off-by: Mark Salyzyn &lt;mark_salyzyn@us.xyratex.com&gt;
Tested-by: Jack Wang &lt;jack_wang@usish.com&gt;
Cc: stable@kernel.org
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] qla2xxx: Fix crash in qla2x00_abort_all_cmds() on unload</title>
<updated>2011-10-02T16:58:30Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2011-09-22T07:06:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9bfacd01dc9b7519e1e6da12b01963550b9d09a2'/>
<id>urn:sha1:9bfacd01dc9b7519e1e6da12b01963550b9d09a2</id>
<content type='text'>
I hit a crash in qla2x00_abort_all_cmds() if the qla2xxx module is
unloaded right after it is loaded.  I debugged this down to the abort
handling improperly treating a command of type SRB_ADISC_CMD as if it
had a bsg_job to complete when that command actually uses the iocb_cmd
part of the union.  (I guess to hit this one has to unload the module
while the async FC initialization is still in progress)

It seems we should only look for a bsg_job if type is SRB_ELS_CMD_RPT,
SRB_ELS_CMD_HST or SRB_CT_CMD, so switch the test to make that explicit.

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Acked-by: Chad Dupuis &lt;chad.dupuis@qlogic.com&gt;
Cc: stable@kernel.org
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>Merge git://bedivere.hansenpartnership.com/git/scsi-rc-fixes-2.6</title>
<updated>2011-09-28T15:23:39Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-09-28T15:23:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=07117e305487b0d4251a97d3529fa2c7d930d36a'/>
<id>urn:sha1:07117e305487b0d4251a97d3529fa2c7d930d36a</id>
<content type='text'>
* git://bedivere.hansenpartnership.com/git/scsi-rc-fixes-2.6:
  [SCSI] 3w-9xxx: fix iommu_iova leak
  [SCSI] cxgb3i: convert cdev-&gt;l2opt to use rcu to prevent NULL dereference
  [SCSI] scsi: qla4xxx needs libiscsi.o
  [SCSI] libsas: fix failure to revalidate domain for anything but the first expander child.
  [SCSI] aacraid: reset should disable MSI interrupt
</content>
</entry>
<entry>
<title>[SCSI] 3w-9xxx: fix iommu_iova leak</title>
<updated>2011-09-26T14:28:58Z</updated>
<author>
<name>James Bottomley</name>
<email>JBottomley@Parallels.com</email>
</author>
<published>2011-09-18T14:56:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=96067723e46b0dd24ae7b934085ab4eff4d26a1b'/>
<id>urn:sha1:96067723e46b0dd24ae7b934085ab4eff4d26a1b</id>
<content type='text'>
Following reports on the list, it looks like the 3e-9xxx driver will leak dma
mappings every time we get a transient queueing error back from the card.
This is because it maps the sg list in the routine that sends the command, but
doesn't unmap again in the transient failure path (even though the command is
sent back to the block layer).  Fix by unmapping before returning the status.

Reported-by: Chris Boot &lt;bootc@bootc.net&gt;
Tested-by: Chris Boot &lt;bootc@bootc.net&gt;
Acked-by: Adam Radford &lt;aradford@gmail.com&gt;
Cc: stable@kernel.org
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] cxgb3i: convert cdev-&gt;l2opt to use rcu to prevent NULL dereference</title>
<updated>2011-09-26T14:28:01Z</updated>
<author>
<name>Neil Horman</name>
<email>nhorman@tuxdriver.com</email>
</author>
<published>2011-09-06T17:59:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e48f129c2f200dde8899f6ea5c6e7173674fc482'/>
<id>urn:sha1:e48f129c2f200dde8899f6ea5c6e7173674fc482</id>
<content type='text'>
This oops was reported recently:
d:mon&gt; e
cpu 0xd: Vector: 300 (Data Access) at [c0000000fd4c7120]
    pc: d00000000076f194: .t3_l2t_get+0x44/0x524 [cxgb3]
    lr: d000000000b02108: .init_act_open+0x150/0x3d4 [cxgb3i]
    sp: c0000000fd4c73a0
   msr: 8000000000009032
   dar: 0
 dsisr: 40000000
  current = 0xc0000000fd640d40
  paca    = 0xc00000000054ff80
    pid   = 5085, comm = iscsid
d:mon&gt; t
[c0000000fd4c7450] d000000000b02108 .init_act_open+0x150/0x3d4 [cxgb3i]
[c0000000fd4c7500] d000000000e45378 .cxgbi_ep_connect+0x784/0x8e8 [libcxgbi]
[c0000000fd4c7650] d000000000db33f0 .iscsi_if_rx+0x71c/0xb18
[scsi_transport_iscsi2]
[c0000000fd4c7740] c000000000370c9c .netlink_data_ready+0x40/0xa4
[c0000000fd4c77c0] c00000000036f010 .netlink_sendskb+0x4c/0x9c
[c0000000fd4c7850] c000000000370c18 .netlink_sendmsg+0x358/0x39c
[c0000000fd4c7950] c00000000033be24 .sock_sendmsg+0x114/0x1b8
[c0000000fd4c7b50] c00000000033d208 .sys_sendmsg+0x218/0x2ac
[c0000000fd4c7d70] c00000000033f55c .sys_socketcall+0x228/0x27c
[c0000000fd4c7e30] c0000000000086a4 syscall_exit+0x0/0x40
--- Exception: c01 (System Call) at 00000080da560cfc

The root cause was an EEH error, which sent us down the offload_close path in
the cxgb3 driver, which in turn sets cdev-&gt;l2opt to NULL, without regard for
upper layer driver (like the cxgbi drivers) which might have execution contexts
in the middle of its use. The result is the oops above, when t3_l2t_get attempts
to dereference L2DATA(cdev)-&gt;nentries in arp_hash right after the EEH error handler sets it to NULL.

The fix is to prevent the setting of the NULL pointer until after there are no
further users of it.  The t3cdev-&gt;l2opt pointer is now converted to be an rcu
pointer and the L2DATA macro is now called under the protection of the
rcu_read_lock().  When the EEH error path:
t3_adapter_error-&gt;offload_close-&gt;cxgb3_offload_deactivate
Is exectured, setting of that l2opt pointer to NULL, is now gated on an rcu
quiescence point, preventing, allowing L2DATA callers to safely check for a NULL
pointer without concern that the underlying data will be freeded before the
pointer is dereferenced.

This has been tested by the reporter and shown to fix the reproted oops

[nhorman: fix up unitinialised variable reported by Dan Carpenter]
Signed-off-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Reviewed-by: Karen Xie &lt;kxie@chelsio.com&gt;
Cc: stable@kernel.org
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>scsi: fix qla2xxx printk format warning</title>
<updated>2011-09-23T23:02:33Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@xenotime.net</email>
</author>
<published>2011-09-23T22:40:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8ec9c7fb15fd8edf6b34555f5b498033121b2173'/>
<id>urn:sha1:8ec9c7fb15fd8edf6b34555f5b498033121b2173</id>
<content type='text'>
sector_t can be different types, so cast it to its largest possible
type.

  drivers/scsi/qla2xxx/qla_isr.c:1509:5: warning: format '%lx' expects type 'long unsigned int', but argument 5 has type 'sector_t'

Signed-off-by: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>scsi: SCSI_ISCI needs to select SCSI_SAS_HOST_SMP, fixes build error</title>
<updated>2011-09-23T23:02:33Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@xenotime.net</email>
</author>
<published>2011-09-23T22:43:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2b7fe39babcbd67458a0c4fbed5704089e0c8c1f'/>
<id>urn:sha1:2b7fe39babcbd67458a0c4fbed5704089e0c8c1f</id>
<content type='text'>
SCSI_ISCI needs to select SCSI_SAS_HOST_SMP to ensure that all
needed symbols are available to it.

Fixes this build error:

  ERROR: "try_test_sas_gpio_gp_bit" [drivers/scsi/isci/isci.ko] undefined!

Signed-off-by: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>[SCSI] scsi: qla4xxx needs libiscsi.o</title>
<updated>2011-09-22T07:25:48Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@xenotime.net</email>
</author>
<published>2011-08-31T22:02:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3538a001ea7db13fa1be2966b71f69d808acff01'/>
<id>urn:sha1:3538a001ea7db13fa1be2966b71f69d808acff01</id>
<content type='text'>
qla4xxx driver needs to be linked with libiscsi.o to fix
build errors.  This happens when no other drivers that use
libiscsi.o are enabled.

ERROR: "iscsi_conn_stop" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
ERROR: "iscsi_conn_get_addr_param" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
ERROR: "iscsi_session_teardown" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
ERROR: "iscsi_host_alloc" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
ERROR: "iscsi_conn_start" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
ERROR: "iscsi_conn_send_pdu" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
ERROR: "iscsi_session_get_param" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
ERROR: "iscsi_conn_get_param" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
ERROR: "iscsi_set_param" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
ERROR: "iscsi_session_failure" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
ERROR: "iscsi_complete_pdu" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
ERROR: "iscsi_session_setup" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
ERROR: "iscsi_conn_bind" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
ERROR: "iscsi_conn_setup" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!
ERROR: "iscsi_itt_to_task" [drivers/scsi/qla4xxx/qla4xxx.ko] undefined!

Signed-off-by: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Reviewed-by: Mike Christie &lt;michaelc@cs.wisc.edu&gt;
Cc: stable@kernel.org
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] libsas: fix failure to revalidate domain for anything but the first expander child.</title>
<updated>2011-09-22T07:23:56Z</updated>
<author>
<name>Mark Salyzyn</name>
<email>mark_salyzyn@us.xyratex.com</email>
</author>
<published>2011-09-01T13:11:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=24926dadc41cc566e974022b0e66231b82c6375f'/>
<id>urn:sha1:24926dadc41cc566e974022b0e66231b82c6375f</id>
<content type='text'>
In an enclosure model where there are chaining expanders to a large body
of storage, it was discovered that libsas, responding to a broadcast
event change, would only revalidate the domain of first child expander
in the list.

The issue is that the pointer value to the discovered source device was
used to break out of the loop, rather than the content of the pointer.

This still remains non-compliant as the revalidate domain code is
supposed to loop through all child expanders, and not stop at the first
one it finds that reports a change count. However, the design of this
routine does not allow multiple device discoveries and that would be a
more complicated set of patches reserved for another day. We are fixing
the glaring bug rather than refactoring the code.

Signed-off-by: Mark Salyzyn &lt;msalyzyn@us.xyratex.com&gt;
Cc: stable@kernel.org
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] aacraid: reset should disable MSI interrupt</title>
<updated>2011-09-22T07:17:32Z</updated>
<author>
<name>Vasily Averin</name>
<email>vvs@parallels.com</email>
</author>
<published>2011-09-02T15:31:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d0efab26f89506387a1bde898556660e06d7eb15'/>
<id>urn:sha1:d0efab26f89506387a1bde898556660e06d7eb15</id>
<content type='text'>
scsi reset on hardware with enabled MSI interrupts generates WARNING message

[11027.798722] aacraid: Host adapter abort request (0,0,0,0)
[11027.798814] aacraid: Host adapter reset request. SCSI hang ?
[11087.762237] aacraid: SCSI bus appears hung
[11135.082543] ------------[ cut here ]------------
[11135.082646] WARNING: at drivers/pci/msi.c:658 pci_enable_msi_block+0x251/0x290()

Signed-off-by: Vasily Averin &lt;vvs@sw.ru&gt;
Acked-by: Mark Salyzyn &lt;mark_salyzyn@us.xyratex.com&gt;
Cc: stable@kernel.org
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
</feed>
