<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/target, branch v3.3.7</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/target?h=v3.3.7</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/target?h=v3.3.7'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-05-21T17:46:21Z</updated>
<entry>
<title>target: Fix bug in handling of FILEIO + block_device resize ops</title>
<updated>2012-05-21T17:46:21Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2012-05-16T23:05:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c52d567fdf7fb8cdaf2d34206f5b7f4adaae1595'/>
<id>urn:sha1:c52d567fdf7fb8cdaf2d34206f5b7f4adaae1595</id>
<content type='text'>
commit cd9323fd68aee3c1c6b5b21e5746c9d1b586fb58 upstream.

This patch fixes a bug in the handling of FILEIO w/ underlying block_device
resize operations where the original fd_dev-&gt;fd_dev_size was incorrectly being
used in fd_get_blocks() for READ_CAPACITY response payloads.

This patch avoids using fd_dev-&gt;fd_dev_size for FILEIO devices with
an underlying block_device, and instead changes fd_get_blocks() to
get the sector count directly from i_size_read() as recommended by hch.

Reported-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>target: Fix SPC-2 RELEASE bug for multi-session iSCSI client setups</title>
<updated>2012-05-21T17:46:21Z</updated>
<author>
<name>Bernhard Kohl</name>
<email>Riedel-und-Kohl@t-online.de</email>
</author>
<published>2012-05-13T21:39:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2307b85fbe257c0348f56118d533769d36c9cc8a'/>
<id>urn:sha1:2307b85fbe257c0348f56118d533769d36c9cc8a</id>
<content type='text'>
commit edc318d9fea6854df752ec8c645b960b0d5a1d23 upstream.

This patch addresses a bug in a special case for target core SPC-2 RELEASE
logic where the same physical client (eg: iSCSI InitiatorName) with
differing iSCSI session identifiers (ISID) is allowed to incorrectly release
the same client's SPC-2 reservation from the non reservation holding path.

Note this bug is specific to iscsi-target w/ SPC-2 reservations, and
with the default enforce_pr_isids=1 device attr setting in target-core
controls if a InitiatorName + different ISID reservations are handled
the same as a single iSCSI client entity.

Signed-off-by: Bernhard Kohl &lt;bernhard.kohl@gmx.net&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>target: Drop incorrect se_lun_acl release for dynamic -&gt; explict ACL conversion</title>
<updated>2012-05-21T17:46:21Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2012-05-11T05:05:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6b1d13f897e2b08a66724c685c06f35dc8e114d4'/>
<id>urn:sha1:6b1d13f897e2b08a66724c685c06f35dc8e114d4</id>
<content type='text'>
commit cfebf8f42f47327fa54cf05c19b98f4bd5236a26 upstream.

This patch removes some potentially problematic legacy code within
core_clear_initiator_node_from_tpg() that was originally intended to
release left over se_lun_acl setup during dynamic NodeACL+MappedLUN
generate when running with TPG demo-mode operation.

Since we now only ever expect to allocate and release se_lun_acl from
within target_core_fabric_configfs.c:target_fabric_make_mappedlun() and
target_fabric_drop_mappedlun() context respectively, this code for
demo-mode release is incorrect and needs to be removed.

Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>tcm_fc: Do not free tpg structure during wq allocation failure</title>
<updated>2012-04-13T16:13:55Z</updated>
<author>
<name>Mark Rustad</name>
<email>mark.d.rustad@intel.com</email>
</author>
<published>2012-04-03T17:24:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9fb1fd78804e9c0e477aafa69cd4d31b0a7ef5f0'/>
<id>urn:sha1:9fb1fd78804e9c0e477aafa69cd4d31b0a7ef5f0</id>
<content type='text'>
commit 06383f10c49f507220594a455c6491ca6f8c94ab upstream.

Avoid freeing a registered tpg structure if an alloc_workqueue call
fails.  This fixes a bug where the failure was leaking memory associated
with se_portal_group setup during the original core_tpg_register() call.

Signed-off-by: Mark Rustad &lt;mark.d.rustad@intel.com&gt;
Acked-by: Kiran Patil &lt;Kiran.patil@intel.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>tcm_fc: Add abort flag for gracefully handling exchange timeout</title>
<updated>2012-04-13T16:13:55Z</updated>
<author>
<name>Mark Rustad</name>
<email>mark.d.rustad@intel.com</email>
</author>
<published>2012-04-03T17:24:41Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c63d7f685447174639431744c7b0e1884f2a3742'/>
<id>urn:sha1:c63d7f685447174639431744c7b0e1884f2a3742</id>
<content type='text'>
commit e1c4038282c7586c3544542b37872c434669d3ac upstream.

Add abort flag and use it to terminate processing when an exchange
is timed out or is reset. The abort flag is used in place of the
transport_generic_free_cmd function call in the reset and timeout
cases, because calling that function in that context would free
memory that was in use. The aborted flag allows the lifetime to
be managed in a more normal way, while truncating the processing.

This change eliminates a source of memory corruption which
manifested in a variety of ugly ways.

(nab: Drop unused struct fc_exch *ep in ft_recv_seq)

Signed-off-by: Mark Rustad &lt;mark.d.rustad@intel.com&gt;
Acked-by: Kiran Patil &lt;Kiran.patil@intel.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>target: Fix 16-bit target ports for SET TARGET PORT GROUPS emulation</title>
<updated>2012-04-02T17:32:06Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2012-02-24T01:22:12Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=527a832cda6dbe7ac3a38dcceb7fe422a7980e13'/>
<id>urn:sha1:527a832cda6dbe7ac3a38dcceb7fe422a7980e13</id>
<content type='text'>
commit 33395fb8a13731c7ef7b175dbf5a4d8a6738fe6c upstream.

The old code did (MSB &lt;&lt; 8) &amp; 0xff, which always evaluates to 0.  Just use
get_unaligned_be16() so we don't have to worry about whether our open-coded
version is correct or not.

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>target: prevent NULL pointer dereference in target_report_luns</title>
<updated>2012-04-02T17:32:02Z</updated>
<author>
<name>Jörn Engel</name>
<email>joern@logfs.org</email>
</author>
<published>2012-02-15T21:52:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3b5e7a259c88befb754607dcabd14b4f01bef212'/>
<id>urn:sha1:3b5e7a259c88befb754607dcabd14b4f01bef212</id>
<content type='text'>
commit 47f1b8803e1e358ebbf4f82bfdb98971c912a2c3 upstream.

transport_kmap_data_sg can return NULL.  I never saw this trigger, but
returning -ENOMEM seems better than a crash.  Also removes a pointless
case while at it.

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>target: fix use after free in target_report_luns</title>
<updated>2012-04-02T17:31:57Z</updated>
<author>
<name>Jörn Engel</name>
<email>joern@logfs.org</email>
</author>
<published>2012-02-15T21:51:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1459484eea1cb844a9977b6fe49009dd2668c44a'/>
<id>urn:sha1:1459484eea1cb844a9977b6fe49009dd2668c44a</id>
<content type='text'>
commit 382436f8804fe1cb20b9a2a811a10eb2d8554721 upstream.

Fix possible NULL pointer dereference in target_report_luns failure path.

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>target: Don't set WBUS16 or SYNC bits in INQUIRY response</title>
<updated>2012-04-02T17:31:57Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2012-02-14T00:18:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bda489461f3d0ae38b92ef9a8f8afc82a73945de'/>
<id>urn:sha1:bda489461f3d0ae38b92ef9a8f8afc82a73945de</id>
<content type='text'>
commit effc6cc8828257c32c37635e737f14fd6e19ecd7 upstream.

SPC-4 says about the WBUS16 and SYNC bits:

    The meanings of these fields are specific to SPI-5 (see 6.4.3).
    For SCSI transport protocols other than the SCSI Parallel
    Interface, these fields are reserved.

We don't have a SPI fabric module, so we should never set these bits.
(The comment was misleading, since it only mentioned Sync but the
actual code set WBUS16 too).

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>target: Set peripheral device type consistently in INQUIRY response</title>
<updated>2012-04-02T17:31:56Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2012-02-14T00:18:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3eaca04b3a19f230bf97ffa393aab2987aa8e2a0'/>
<id>urn:sha1:3eaca04b3a19f230bf97ffa393aab2987aa8e2a0</id>
<content type='text'>
commit 089461dda1770c10fea0b988ff74519a9be81d7e upstream.

Current code sets the peripheral device type to 0x3f == "not present
unknown" for virtual LUN 0 for standard INQUIRY commands, but leaves it
as 0 == "connected direct access block" for VPD INQUIRY commands.  This
is just because the check for LUN 0 only happens in some code paths.

Make our peripheral device type consistent by moving the LUN 0 check
into the common emulate_inquiry() code.

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

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