<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/scsi, branch v3.4.57</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/scsi?h=v3.4.57</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/scsi?h=v3.4.57'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-08-04T08:25:45Z</updated>
<entry>
<title>SCSI: qla2xxx: Properly set the tagging for commands.</title>
<updated>2013-08-04T08:25:45Z</updated>
<author>
<name>Saurav Kashyap</name>
<email>saurav.kashyap@qlogic.com</email>
</author>
<published>2013-07-12T18:47:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e5f8b2d71c3b617d2d5ce9568067b1458b47a517'/>
<id>urn:sha1:e5f8b2d71c3b617d2d5ce9568067b1458b47a517</id>
<content type='text'>
commit c3ccb1d7cf4c4549151876dd37c0944a682fd9e1 upstream.

This fixes a regression where Xyratex controllers and disks were lost by the
driver:

https://bugzilla.kernel.org/show_bug.cgi?id=59601

Reported-by: Jack Hill &lt;jackhill@jackhill.us&gt;
Signed-off-by: Saurav Kashyap &lt;saurav.kashyap@qlogic.com&gt;
Signed-off-by: Giridhar Malavali &lt;giridhar.malavali@qlogic.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>SCSI: sd: fix crash when UA received on DIF enabled device</title>
<updated>2013-08-04T08:25:43Z</updated>
<author>
<name>Ewan D. Milne</name>
<email>emilne@redhat.com</email>
</author>
<published>2012-11-02T13:38:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=970f226f08005c3a9b631a6b0dc5d40afd6c27a7'/>
<id>urn:sha1:970f226f08005c3a9b631a6b0dc5d40afd6c27a7</id>
<content type='text'>
commit 085b513f97d8d799d28491239be4b451bcd8c2c5 upstream.

sd_prep_fn will allocate a larger CDB for the command via mempool_alloc
for devices using DIF type 2 protection.  This CDB was being freed
in sd_done, which results in a kernel crash if the command is retried
due to a UNIT ATTENTION.  This change moves the code to free the larger
CDB into sd_unprep_fn instead, which is invoked after the request is
complete.

It is no longer necessary to call scsi_print_command separately for
this case as the -&gt;cmnd will no longer be NULL in the normal code path.

Also removed conditional test for DIF type 2 when freeing the larger
CDB because the protection_type could have been changed via sysfs while
the command was executing.

Signed-off-by: Ewan D. Milne &lt;emilne@redhat.com&gt;
Acked-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>SCSI: Fix incorrect memset in bnx2fc_parse_fcp_rsp</title>
<updated>2013-07-28T23:26:09Z</updated>
<author>
<name>Andi Kleen</name>
<email>andi@firstfloor.org</email>
</author>
<published>2012-09-03T18:50:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2f5234d8cba16f698332e3b5ba5cc92d85ae33c3'/>
<id>urn:sha1:2f5234d8cba16f698332e3b5ba5cc92d85ae33c3</id>
<content type='text'>
commit 16da05b1158d1bcb31656e636a8736a663b1cf1f upstream.

gcc 4.8 warns because the memset only clears sizeof(char *) bytes, not
the whole buffer. Use the correct buffer size and clear the whole sense
buffer.

/backup/lsrc/git/linux-lto-2.6/drivers/scsi/bnx2fc/bnx2fc_io.c: In
function 'bnx2fc_parse_fcp_rsp':
/backup/lsrc/git/linux-lto-2.6/drivers/scsi/bnx2fc/bnx2fc_io.c:1810:41:
warning: argument to 'sizeof' in 'memset' call is the same expression as
the destination; did you mean to provide an explicit length?
[-Wsizeof-pointer-memaccess]
   memset(sc_cmd-&gt;sense_buffer, 0, sizeof(sc_cmd-&gt;sense_buffer));
                                         ^

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Acked-by: Bhanu Prakash Gollapudi &lt;bprakash@broadcom.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Cc: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>SCSI: megaraid_sas: fix memory leak if SGL has zero length entries</title>
<updated>2013-07-28T23:26:09Z</updated>
<author>
<name>Bjørn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2012-11-21T08:54:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5c88c30cc3cff0bbd1ee722460a4e96bf29b62dc'/>
<id>urn:sha1:5c88c30cc3cff0bbd1ee722460a4e96bf29b62dc</id>
<content type='text'>
commit 7a6a731bd00ca90d0e250867c3b9c05b5ff0fa49 upstream.

commit 98cb7e44 ([SCSI] megaraid_sas: Sanity check user
supplied length before passing it to dma_alloc_coherent())
introduced a memory leak.  Memory allocated for entries
following zero length SGL entries will not be freed.

Reference: http://bugs.debian.org/688198

Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Acked-by: Adam Radford &lt;aradford@gmail.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>SCSI: mpt2sas: fix firmware failure with wrong task attribute</title>
<updated>2013-07-28T23:25:47Z</updated>
<author>
<name>Sreekanth Reddy</name>
<email>Sreekanth.Reddy@lsi.com</email>
</author>
<published>2013-02-01T19:28:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=39d2dd53da0ef0be782387f79fe6bfefc0808629'/>
<id>urn:sha1:39d2dd53da0ef0be782387f79fe6bfefc0808629</id>
<content type='text'>
commit 48ba2efc382f94fae16ca8ca011e5961a81ad1ea upstream.

When SCSI command is received with task attribute not set, set it to SIMPLE.
Previously it is set to untagged. This causes the firmware to fail the commands.

Signed-off-by: Sreekanth Reddy &lt;Sreekanth.Reddy@lsi.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>SCSI: sd: Fix parsing of 'temporary ' cache mode prefix</title>
<updated>2013-07-13T18:03:41Z</updated>
<author>
<name>Ben Hutchings</name>
<email>ben@decadent.org.uk</email>
</author>
<published>2013-05-27T18:07:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=36c982c1c71b5bb35d06d46ffb82593bf8dbe8c7'/>
<id>urn:sha1:36c982c1c71b5bb35d06d46ffb82593bf8dbe8c7</id>
<content type='text'>
commit 2ee3e26c673e75c05ef8b914f54fadee3d7b9c88 upstream.

Commit 39c60a0948cc '[SCSI] sd: fix array cache flushing bug causing
performance problems' added temp as a pointer to "temporary " and used
sizeof(temp) - 1 as its length.  But sizeof(temp) is the size of the
pointer, not the size of the string constant.  Change temp to a static
array so that sizeof() does what was intended.

Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>block: do not pass disk names as format strings</title>
<updated>2013-07-13T18:03:41Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2013-07-03T22:01:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a8139b5b8b1355c4909d90afa58b055aabe1a272'/>
<id>urn:sha1:a8139b5b8b1355c4909d90afa58b055aabe1a272</id>
<content type='text'>
commit ffc8b30866879ed9ba62bd0a86fecdbd51cd3d19 upstream.

Disk names may contain arbitrary strings, so they must not be
interpreted as format strings.  It seems that only md allows arbitrary
strings to be used for disk names, but this could allow for a local
memory corruption from uid 0 into ring 0.

CVE-2013-2851

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>SCSI: sd: fix array cache flushing bug causing performance problems</title>
<updated>2013-05-19T17:54:39Z</updated>
<author>
<name>James Bottomley</name>
<email>JBottomley@Parallels.com</email>
</author>
<published>2013-04-24T21:02:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7c8b65e18db43c918ec3491e2712432d2a33f8a5'/>
<id>urn:sha1:7c8b65e18db43c918ec3491e2712432d2a33f8a5</id>
<content type='text'>
commit 39c60a0948cc06139e2fbfe084f83cb7e7deae3b upstream.

Some arrays synchronize their full non volatile cache when the sd driver sends
a SYNCHRONIZE CACHE command.  Unfortunately, they can have Terrabytes of this
and we send a SYNCHRONIZE CACHE for every barrier if an array reports it has a
writeback cache.  This leads to massive slowdowns on journalled filesystems.

The fix is to allow userspace to turn off the writeback cache setting as a
temporary measure (i.e. without doing the MODE SELECT to write it back to the
device), so even though the device reported it has a writeback cache, the
user, knowing that the cache is non volatile and all they care about is
filesystem correctness, can turn that bit off in the kernel and avoid the
performance ruinous (and safety irrelevant) SYNCHRONIZE CACHE commands.

The way you do this is add a 'temporary' prefix when performing the usual
cache setting operations, so

echo temporary write through &gt; /sys/class/scsi_disk/&lt;disk&gt;/cache_type

Reported-by: Ric Wheeler &lt;rwheeler@redhat.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>SCSI: libsas: fix handling vacant phy in sas_set_ex_phy()</title>
<updated>2013-04-17T04:27:26Z</updated>
<author>
<name>Lukasz Dorau</name>
<email>lukasz.dorau@intel.com</email>
</author>
<published>2013-04-03T08:27:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b7dba0e4be51d0924af476456d2cb0f903e8aa77'/>
<id>urn:sha1:b7dba0e4be51d0924af476456d2cb0f903e8aa77</id>
<content type='text'>
commit d4a2618fa77b5e58ec15342972bd3505a1c3f551 upstream.

If a result of the SMP discover function is PHY VACANT,
the content of discover response structure (dr) is not valid.
It sometimes happens that dr-&gt;attached_sas_addr can contain
even SAS address of other phy. In such case an invalid phy
is created, what causes NULL pointer dereference during
destruction of expander's phys.

So if a result of SMP function is PHY VACANT, the content of discover
response structure (dr) must not be copied to phy structure.

This patch fixes the following bug:

BUG: unable to handle kernel NULL pointer dereference at 0000000000000030
IP: [&lt;ffffffff811c9002&gt;] sysfs_find_dirent+0x12/0x90
Call Trace:
  [&lt;ffffffff811c95f5&gt;] sysfs_get_dirent+0x35/0x80
  [&lt;ffffffff811cb55e&gt;] sysfs_unmerge_group+0x1e/0xb0
  [&lt;ffffffff813329f4&gt;] dpm_sysfs_remove+0x24/0x90
  [&lt;ffffffff8132b0f4&gt;] device_del+0x44/0x1d0
  [&lt;ffffffffa016fc59&gt;] sas_rphy_delete+0x9/0x20 [scsi_transport_sas]
  [&lt;ffffffffa01a16f6&gt;] sas_destruct_devices+0xe6/0x110 [libsas]
  [&lt;ffffffff8107ac7c&gt;] process_one_work+0x16c/0x350
  [&lt;ffffffff8107d84a&gt;] worker_thread+0x17a/0x410
  [&lt;ffffffff81081b76&gt;] kthread+0x96/0xa0
  [&lt;ffffffff81464944&gt;] kernel_thread_helper+0x4/0x10

Signed-off-by: Lukasz Dorau &lt;lukasz.dorau@intel.com&gt;
Signed-off-by: Pawel Baldysiak &lt;pawel.baldysiak@intel.com&gt;
Reviewed-by: Maciej Patelczyk &lt;maciej.patelczyk@intel.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>SCSI: storvsc: Initialize the sglist</title>
<updated>2013-03-14T18:29:42Z</updated>
<author>
<name>K. Y. Srinivasan</name>
<email>kys@microsoft.com</email>
</author>
<published>2013-02-06T13:15:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c60de9344ceeedd5f61a655af34306002fda9167'/>
<id>urn:sha1:c60de9344ceeedd5f61a655af34306002fda9167</id>
<content type='text'>
commit 9d2696e658ef4f209955ddaa987d43f1a1bd81a1 upstream.

Properly initialize scatterlist before using it.

Signed-off-by: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
