<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/target, branch v3.15</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/target?h=v3.15</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/target?h=v3.15'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2014-06-06T08:22:41Z</updated>
<entry>
<title>target: Fix alua_access_state attribute OOPs for un-configured devices</title>
<updated>2014-06-06T08:22:41Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2014-06-06T07:52:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f1453773514bb8b0bba0716301e8c8f17f8d39c7'/>
<id>urn:sha1:f1453773514bb8b0bba0716301e8c8f17f8d39c7</id>
<content type='text'>
This patch fixes a OOPs where an attempt to write to the per-device
alua_access_state configfs attribute at:

  /sys/kernel/config/target/core/$HBA/$DEV/alua/$TG_PT_GP/alua_access_state

results in an NULL pointer dereference when the backend device has not
yet been configured.

This patch adds an explicit check for DF_CONFIGURED, and fails with
-ENODEV to avoid this case.

Reported-by: Chris Boot &lt;crb@tiger-computing.co.uk&gt;
Reported-by: Philip Gaw &lt;pgaw@darktech.org.uk&gt;
Cc: Chris Boot &lt;crb@tiger-computing.co.uk&gt;
Cc: Philip Gaw &lt;pgaw@darktech.org.uk&gt;
Cc: stable@vger.kernel.org # 3.8+
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Allow READ_CAPACITY opcode in ALUA Standby access state</title>
<updated>2014-06-06T08:21:12Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2014-06-06T06:37:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e7810c2d2c37fa8e58dda74b00790dab60fe6fba'/>
<id>urn:sha1:e7810c2d2c37fa8e58dda74b00790dab60fe6fba</id>
<content type='text'>
This patch allows READ_CAPACITY + SAI_READ_CAPACITY_16 opcode
processing to occur while the associated ALUA group is in Standby
access state.

This is required to avoid host side LUN probe failures during the
initial scan if an ALUA group has already implicitly changed into
Standby access state.

This addresses a bug reported by Chris + Philip using dm-multipath
+ ESX hosts configured with ALUA multipath.

Reported-by: Chris Boot &lt;crb@tiger-computing.co.uk&gt;
Reported-by: Philip Gaw &lt;pgaw@darktech.org.uk&gt;
Cc: Chris Boot &lt;crb@tiger-computing.co.uk&gt;
Cc: Philip Gaw &lt;pgaw@darktech.org.uk&gt;
Cc: Hannes Reinecke &lt;hare@suse.de&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>iser-target: Fix multi network portal shutdown regression</title>
<updated>2014-06-04T02:17:32Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2014-06-04T01:27:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2363d196686e44c0158929e7cf96c8589a24a81b'/>
<id>urn:sha1:2363d196686e44c0158929e7cf96c8589a24a81b</id>
<content type='text'>
This patch fixes a iser-target specific regression introduced in
v3.15-rc6 with:

commit 14f4b54fe38f3a8f8392a50b951c8aa43b63687a
Author: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Date:   Tue Apr 29 13:13:47 2014 +0300

    Target/iscsi,iser: Avoid accepting transport connections during stop stage

where the change to set iscsi_np-&gt;enabled = false within
iscsit_clear_tpg_np_login_thread() meant that a iscsi_np with
two iscsi_tpg_np exports would have it's parent iscsi_np set
to a disabled state, even if other iscsi_tpg_np exports still
existed.

This patch changes iscsit_clear_tpg_np_login_thread() to only
set iscsi_np-&gt;enabled = false when shutdown = true, and also
changes iscsit_del_np() to set iscsi_np-&gt;enabled = true when
iscsi_np-&gt;np_exports is non zero.

Cc: Sagi Grimberg &lt;sagig@dev.mellanox.co.il&gt;
Cc: stable@vger.kernel.org # 3.10+
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>iscsi-target: Fix wrong buffer / buffer overrun in iscsi_change_param_value()</title>
<updated>2014-06-04T02:17:31Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2014-05-29T20:32:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=79d59d08082dd0a0a18f8ceb78c99f9f321d72aa'/>
<id>urn:sha1:79d59d08082dd0a0a18f8ceb78c99f9f321d72aa</id>
<content type='text'>
In non-leading connection login, iscsi_login_non_zero_tsih_s1() calls
iscsi_change_param_value() with the buffer it uses to hold the login
PDU, not a temporary buffer.  This leads to the login header getting
corrupted and login failing for non-leading connections in MC/S.

Fix this by adding a wrapper iscsi_change_param_sprintf() that handles
the temporary buffer itself to avoid confusion.  Also handle sending a
reject in case of failure in the wrapper, which lets the calling code
get quite a bit smaller and easier to read.

Finally, bump the size of the temporary buffer from 32 to 64 bytes to be
safe, since "MaxRecvDataSegmentLength=" by itself is 25 bytes; with a
trailing NUL, a value &gt;= 1M will lead to a buffer overrun.  (This isn't
the default but we don't need to run right at the ragged edge here)

Reported-by: Santosh Kulkarni &lt;santosh.kulkarni@calsoftinc.com&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Cc: stable@vger.kernel.org # 3.10+
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: fix memory leak on XCOPY</title>
<updated>2014-05-17T22:49:40Z</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2014-05-17T10:49:22Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1e1110c43b1cda9fe77fc4a04835e460550e6b3c'/>
<id>urn:sha1:1e1110c43b1cda9fe77fc4a04835e460550e6b3c</id>
<content type='text'>
On each processed XCOPY command, two "kmalloc-512" memory objects are
leaked. These represent two allocations of struct xcopy_pt_cmd in
target_core_xcopy.c.

The reason for the memory leak is that the cmd_kref field is not
initialized (thus, it is zero because the allocations were done with
kzalloc). When we decrement zero kref in target_put_sess_cmd, the result
is not zero, thus target_release_cmd_kref is not called.

This patch fixes the bug by moving kref initialization from
target_get_sess_cmd to transport_init_se_cmd (this function is called from
target_core_xcopy.c, so it will correctly initialize cmd_kref). It can be
easily verified that all code that calls target_get_sess_cmd also calls
transport_init_se_cmd earlier, thus moving kref_init shouldn't introduce
any new problems.

Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Cc: stable@vger.kernel.org	# 3.12+
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Don't allow setting WC emulation if device doesn't support</title>
<updated>2014-05-16T00:09:17Z</updated>
<author>
<name>Andy Grover</name>
<email>agrover@redhat.com</email>
</author>
<published>2014-05-14T22:48:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=07b8dae38b09bcfede7e726f172e39b5ce8390d9'/>
<id>urn:sha1:07b8dae38b09bcfede7e726f172e39b5ce8390d9</id>
<content type='text'>
Just like for pSCSI, if the transport sets get_write_cache, then it is
not valid to enable write cache emulation for it. Return an error.

see https://bugzilla.redhat.com/show_bug.cgi?id=1082675

Reviewed-by: Chris Leech &lt;cleech@redhat.com&gt;
Signed-off-by: Andy Grover &lt;agrover@redhat.com&gt;
Cc: stable@vger.kernel.org # 3.10+
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>iscsi-target: Disable Immediate + Unsolicited Data with ISER Protection</title>
<updated>2014-05-16T00:09:12Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2014-05-14T20:54:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=52d0aa7980cfee85c831b2969e659055395386d4'/>
<id>urn:sha1:52d0aa7980cfee85c831b2969e659055395386d4</id>
<content type='text'>
This patch explicitly disables Immediate + Unsolicited Data for ISER
connections during login in iscsi_login_zero_tsih_s2() when protection
has been enabled for the session by the underlying hardware.

This is currently required because protection / signature memory regions
(MRs) expect T10 PI to occur on RDMA READs + RDMA WRITEs transfers, and
not on a immediate data payload associated with ISCSI_OP_SCSI_CMD, or
unsolicited data-out associated with a ISCSI_OP_SCSI_DATA_OUT.

v2 changes:
  - Add TARGET_PROT_DOUT_INSERT check (Sagi)
  - Add pr_debug noisemaker (Sagi)
  - Add goto to avoid early return from MRDSL check (nab)

Cc: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Cc: Or Gerlitz &lt;ogerlitz@mellanox.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>tcm_fc: Fix free-after-use regression in ft_free_cmd</title>
<updated>2014-05-16T00:09:12Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2014-05-12T19:18:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ed8ec8f707ed4760c124d47b27c93df8ec5b1eba'/>
<id>urn:sha1:ed8ec8f707ed4760c124d47b27c93df8ec5b1eba</id>
<content type='text'>
This patch fixes a free-after-use regression in ft_free_cmd(), where
ft_sess_put() is called with cmd-&gt;sess after percpu_ida_free() has
already released the tag.

Fix this bug by saving the ft_sess pointer ahead of percpu_ida_free(),
and pass it directly to ft_sess_put().

The regression was originally introduced in v3.13-rc1 commit:

  commit 5f544cfac956971099e906f94568bc3fd1a7108a
  Author: Nicholas Bellinger &lt;nab@daterainc.com&gt;
  Date:   Mon Sep 23 12:12:42 2013 -0700

      tcm_fc: Convert to per-cpu command map pre-allocation of ft_cmd

Reported-by: Jun Wu &lt;jwu@stormojo.com&gt;
Cc: Mark Rustad &lt;mark.d.rustad@intel.com&gt;
Cc: Robert Love &lt;robert.w.love@intel.com&gt;
Cc: &lt;stable@vger.kernel.org&gt; #3.13+
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>iscsi-target: Change BUG_ON to REJECT in iscsit_process_nop_out</title>
<updated>2014-05-16T00:09:11Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2014-05-01T20:44:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7cbfcc953789ff864c2bf8365a82a3fba4869649'/>
<id>urn:sha1:7cbfcc953789ff864c2bf8365a82a3fba4869649</id>
<content type='text'>
This patch changes an incorrect use of BUG_ON to instead generate a
REJECT + PROTOCOL_ERROR in iscsit_process_nop_out() code.  This case
can occur with traditional TCP where a flood of zeros in the data
stream can reach this block for what is presumed to be a NOP-OUT with
a solicited reply, but without a valid iscsi_cmd pointer.

This incorrect BUG_ON was introduced during the v3.11-rc timeframe
with the following commit:

commit 778de368964c5b7e8100cde9f549992d521e9c89
Author: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Date:   Fri Jun 14 16:07:47 2013 -0700

    iscsi/isert-target: Refactor ISCSI_OP_NOOP RX handling

Reported-by: Arshad Hussain &lt;arshad.hussain@calsoftinc.com&gt;
Cc: stable@vger.kernel.org # 3.11+
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>Target/iscsi,iser: Avoid accepting transport connections during stop stage</title>
<updated>2014-05-16T00:09:11Z</updated>
<author>
<name>Sagi Grimberg</name>
<email>sagig@mellanox.com</email>
</author>
<published>2014-04-29T10:13:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=14f4b54fe38f3a8f8392a50b951c8aa43b63687a'/>
<id>urn:sha1:14f4b54fe38f3a8f8392a50b951c8aa43b63687a</id>
<content type='text'>
When the target is in stop stage, iSER transport initiates RDMA disconnects.
The iSER initiator may wish to establish a new connection over the
still existing network portal. In this case iSER transport should not
accept and resume new RDMA connections. In order to learn that, iscsi_np
is added with enabled flag so the iSER transport can check when deciding
weather to accept and resume a new connection request.

The iscsi_np is enabled after successful transport setup, and disabled
before iscsi_np login threads are cleaned up.

Signed-off-by: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Cc: stable@vger.kernel.org # 3.10+
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
</feed>
