<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/scsi, branch v3.2.2</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/scsi?h=v3.2.2</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/scsi?h=v3.2.2'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-01-26T00:13:48Z</updated>
<entry>
<title>sym53c8xx: Fix NULL pointer dereference in slave_destroy</title>
<updated>2012-01-26T00:13:48Z</updated>
<author>
<name>Stratos Psomadakis</name>
<email>psomas@gentoo.org</email>
</author>
<published>2011-12-04T00:23:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b328e18f8ba3c8a32ba45952ae5bf8dd39d73120'/>
<id>urn:sha1:b328e18f8ba3c8a32ba45952ae5bf8dd39d73120</id>
<content type='text'>
commit cced5041ed5a2d1352186510944b0ddfbdbe4c0b upstream.

sym53c8xx_slave_destroy unconditionally assumes that sym53c8xx_slave_alloc has
succesesfully allocated a sym_lcb. This can lead to a NULL pointer dereference
(exposed by commit 4e6c82b).

Signed-off-by: Stratos Psomadakis &lt;psomas@gentoo.org&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>block: fail SCSI passthrough ioctls on partition devices</title>
<updated>2012-01-26T00:13:42Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2012-01-12T15:01:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d33310de0d7914f2e27ed4fef67a1979f10037e1'/>
<id>urn:sha1:d33310de0d7914f2e27ed4fef67a1979f10037e1</id>
<content type='text'>
commit 0bfc96cb77224736dfa35c3c555d37b3646ef35e upstream.

[ Changes with respect to 3.3: return -ENOTTY from scsi_verify_blk_ioctl
  and -ENOIOCTLCMD from sd_compat_ioctl. ]

Linux allows executing the SG_IO ioctl on a partition or LVM volume, and
will pass the command to the underlying block device.  This is
well-known, but it is also a large security problem when (via Unix
permissions, ACLs, SELinux or a combination thereof) a program or user
needs to be granted access only to part of the disk.

This patch lets partitions forward a small set of harmless ioctls;
others are logged with printk so that we can see which ioctls are
actually sent.  In my tests only CDROM_GET_CAPABILITY actually occurred.
Of course it was being sent to a (partition on a) hard disk, so it would
have failed with ENOTTY and the patch isn't changing anything in
practice.  Still, I'm treating it specially to avoid spamming the logs.

In principle, this restriction should include programs running with
CAP_SYS_RAWIO.  If for example I let a program access /dev/sda2 and
/dev/sdb, it still should not be able to read/write outside the
boundaries of /dev/sda2 independent of the capabilities.  However, for
now programs with CAP_SYS_RAWIO will still be allowed to send the
ioctls.  Their actions will still be logged.

This patch does not affect the non-libata IDE driver.  That driver
however already tests for bd != bd-&gt;bd_contains before issuing some
ioctl; it could be restricted further to forbid these ioctls even for
programs running with CAP_SYS_ADMIN/CAP_SYS_RAWIO.

Cc: linux-scsi@vger.kernel.org
Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Cc: James Bottomley &lt;JBottomley@parallels.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
[ Make it also print the command name when warning - Linus ]
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>block: add and use scsi_blk_cmd_ioctl</title>
<updated>2012-01-26T00:13:42Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2012-01-12T15:01:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=36a7ce632fb11cce578b7fdf4b4bbc8fbb99987a'/>
<id>urn:sha1:36a7ce632fb11cce578b7fdf4b4bbc8fbb99987a</id>
<content type='text'>
commit 577ebb374c78314ac4617242f509e2f5e7156649 upstream.

Introduce a wrapper around scsi_cmd_ioctl that takes a block device.

The function will then be enhanced to detect partition block devices
and, in that case, subject the ioctls to whitelisting.

Cc: linux-scsi@vger.kernel.org
Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Cc: James Bottomley &lt;JBottomley@parallels.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>SCSI: mpt2sas : Fix for memory allocation error for large host credits</title>
<updated>2012-01-26T00:13:19Z</updated>
<author>
<name>nagalakshmi.nandigama@lsi.com</name>
<email>nagalakshmi.nandigama@lsi.com</email>
</author>
<published>2011-12-01T02:23:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=312544d8eac340d3ada92dbd2c60c63d229fbcf6'/>
<id>urn:sha1:312544d8eac340d3ada92dbd2c60c63d229fbcf6</id>
<content type='text'>
commit aff132d95ffe14eca96cab90597cdd010b457af7 upstream.

The amount of memory required for tracking chain buffers is rather
large, and when the host credit count is big, memory allocation
failure occurs inside __get_free_pages.

The fix is to limit the number of chains to 100,000.  In addition,
the number of host credits is limited to 30,000 IOs. However this
limitation can be overridden this using the command line option
max_queue_depth.  The algorithm for calculating the
reply_post_queue_depth is changed so that it is equal to
(reply_free_queue_depth + 16), previously it was (reply_free_queue_depth * 2).

Signed-off-by: Nagalakshmi Nandigama &lt;nagalakshmi.nandigama@lsi.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>SCSI: mpt2sas: Release spinlock for the raid device list before blocking it</title>
<updated>2012-01-26T00:13:19Z</updated>
<author>
<name>nagalakshmi.nandigama@lsi.com</name>
<email>nagalakshmi.nandigama@lsi.com</email>
</author>
<published>2011-12-01T02:22:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7af050182f68de53d4c323367c793c580e956041'/>
<id>urn:sha1:7af050182f68de53d4c323367c793c580e956041</id>
<content type='text'>
commit 30c43282f3d347f47f9e05199d2b14f56f3f2837 upstream.

Added code to release the spinlock that is used to protect the
raid device list before calling a function that can block. The
blocking was causing a reschedule, and subsequently it is tried
to acquire the same lock, resulting in a panic (NMI Watchdog
detecting a CPU lockup).

Signed-off-by: Nagalakshmi Nandigama &lt;nagalakshmi.nandigama@lsi.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>[SCSI] fcoe: fix fcoe in a DCB environment by adding DCB notifiers to set skb priority</title>
<updated>2011-12-15T07:02:07Z</updated>
<author>
<name>john fastabend</name>
<email>john.r.fastabend@intel.com</email>
</author>
<published>2011-11-18T21:35:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6f6c2aa33b915c574543f176dee89d7aefc115c1'/>
<id>urn:sha1:6f6c2aa33b915c574543f176dee89d7aefc115c1</id>
<content type='text'>
Use DCB notifiers to set the skb priority to allow packets
to be steered and tagged correctly over DCB enabled drivers
that setup traffic classes.

This allows queue_mapping() routines to be removed in these
drivers that were previously inspecting the ethertype of
every skb to mark FCoE/FIP frames.

Signed-off-by: John Fastabend &lt;john.r.fastabend@intel.com&gt;
Signed-off-by: Robert Love &lt;robert.w.love@intel.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] bnx2i: Fixed kernel panic caused by unprotected task-&gt;sc-&gt;request deref</title>
<updated>2011-12-14T13:05:23Z</updated>
<author>
<name>Eddie Wai</name>
<email>eddie.wai@broadcom.com</email>
</author>
<published>2011-12-07T06:41:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a878185c3b93e692ace0d1628a47f3d75504ab4f'/>
<id>urn:sha1:a878185c3b93e692ace0d1628a47f3d75504ab4f</id>
<content type='text'>
During session recovery, the conn_stop call will trigger a flush
to all outstanding SCSI cmds in the xmit queue.  This will set
all outstanding task-&gt;sc to NULL prior to the session_teardown
call which frees the task memory.

In the bnx2i SCSI response processing path, only the task was being checked
for NULL under the session lock before the task-&gt;sc-&gt;request dereferencing.
If there are outstanding SCSI cmd responses pending for process, the
following kernel panic can be exposed where task-&gt;sc was found to be NULL.

 Call Trace:
[   69.720205]  [&lt;ffffffffa040d0d0&gt;] bnx2i_process_new_cqes+0x290/0x3c0 [bnx2i]
[   69.804289]  [&lt;ffffffffa040d233&gt;] bnx2i_fastpath_notification+0x33/0xa0 [bnx2
i]
[   69.891490]  [&lt;ffffffffa040d37b&gt;] bnx2i_indicate_kcqe+0xdb/0x330 [bnx2i]
[   69.971427]  [&lt;ffffffffa03eac5e&gt;] service_kcqes+0x16e/0x1d0 [cnic]
[   70.045132]  [&lt;ffffffffa03eacea&gt;] cnic_service_bnx2x_kcq+0x2a/0x50 [cnic]
[   70.126105]  [&lt;ffffffffa03ead53&gt;] cnic_service_bnx2x_bh+0x43/0x140 [cnic]
[   70.207081]  [&lt;ffffffff81060676&gt;] tasklet_action+0x66/0x110
[   70.273521]  [&lt;ffffffff8106025f&gt;] __do_softirq+0xef/0x220
[   70.337887]  [&lt;ffffffff81447ebc&gt;] call_softirq+0x1c/0x30

This patch adds the !task-&gt;sc check and also protects the sc dereferencing
under the session lock.

Signed-off-by: Eddie Wai &lt;eddie.wai@broadcom.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] qla4xxx: check for failed conn setup</title>
<updated>2011-12-14T11:40:44Z</updated>
<author>
<name>Mike Christie</name>
<email>michaelc@cs.wisc.edu</email>
</author>
<published>2011-12-02T03:38:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ff1d0319ac6a5fd859884b30c0a3cb6733b8fb2d'/>
<id>urn:sha1:ff1d0319ac6a5fd859884b30c0a3cb6733b8fb2d</id>
<content type='text'>
iscsi_conn_setup can fail so we must check for NULL being
returned.

Signed-off-by: Mike Christie &lt;michaelc@cs.wisc.edu&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] qla4xxx: a small loop fix</title>
<updated>2011-12-14T11:40:43Z</updated>
<author>
<name>Tomas Henzl</name>
<email>thenzl@redhat.com</email>
</author>
<published>2011-12-02T03:38:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e1cd89c507b41e4021ce6fb0d19d230f6a932ccd'/>
<id>urn:sha1:e1cd89c507b41e4021ce6fb0d19d230f6a932ccd</id>
<content type='text'>
When the qla4xxx_get_fwddb_entry returns QLA_ERROR
the nex_idx is not updated,
      for (idx = 0; idx &lt; max_ddbs; idx = next_idx) {
                ret = qla4xxx_get_fwddb_entry(ha, idx, NULL, 0, NULL,
                                              &amp;next_idx, &amp;state, &amp;conn_err,
                                                NULL, NULL);
                if (ret == QLA_ERROR)
                        continue;

This means there is a risk that the 'idx &lt; max_ddbs' condition will never
met and the loop will loop forever.
Fix this by explicitly increasing the next_idx in the error condition.

Maybe a break instead of continue is more appropriate, leaving the decision
on the qlogic maintainer.

Signed-off-by: Tomas Henzl &lt;thenzl@redhat.com&gt;
Signed-off-by: Mike Christie &lt;michaelc@cs.wisc.edu&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] qla4xxx: fix flash/ddb support</title>
<updated>2011-12-14T11:40:43Z</updated>
<author>
<name>Mike Christie</name>
<email>michaelc@cs.wisc.edu</email>
</author>
<published>2011-12-02T03:38:41Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=13483730a13bef372894aefcf73760f5c6c297be'/>
<id>urn:sha1:13483730a13bef372894aefcf73760f5c6c297be</id>
<content type='text'>
With open-iscsi support, target entries persisted in the FLASH were not
login. Added support in the qla4xxx driver to do the login on probe
time to the target entries saved in the FLASH by user.
With this changes upgrade to the new kernel with open-iscsi support in
qla4xxx will ensure users original target entries login on driver load

Signed-off-by: Manish Rangankar &lt;manish.rangankar@qlogic.com&gt;
Signed-off-by: Ravi Anand &lt;ravi.anand@qlogic.com&gt;
Signed-off-by: Mike Christie &lt;michaelc@cs.wisc.edu&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
</feed>
