<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/infiniband/ulp/srpt, branch linux-3.12.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.12.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.12.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-10-06T06:22:03Z</updated>
<entry>
<title>IB/srpt: Simplify srpt_handle_tsk_mgmt()</title>
<updated>2016-10-06T06:22:03Z</updated>
<author>
<name>Bart Van Assche</name>
</author>
<published>2016-02-11T19:03:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=979f1b7344634315d895025b53b002896057c09d'/>
<id>urn:sha1:979f1b7344634315d895025b53b002896057c09d</id>
<content type='text'>
commit 51093254bf879bc9ce96590400a87897c7498463 upstream.

Let the target core check task existence instead of the SRP target
driver. Additionally, let the target core check the validity of the
task management request instead of the ib_srpt driver.

This patch fixes the following kernel crash:

BUG: unable to handle kernel NULL pointer dereference at 0000000000000001
IP: [&lt;ffffffffa0565f37&gt;] srpt_handle_new_iu+0x6d7/0x790 [ib_srpt]
Oops: 0002 [#1] SMP
Call Trace:
 [&lt;ffffffffa05660ce&gt;] srpt_process_completion+0xde/0x570 [ib_srpt]
 [&lt;ffffffffa056669f&gt;] srpt_compl_thread+0x13f/0x160 [ib_srpt]
 [&lt;ffffffff8109726f&gt;] kthread+0xcf/0xe0
 [&lt;ffffffff81613cfc&gt;] ret_from_fork+0x7c/0xb0

Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Fixes: 3e4f574857ee ("ib_srpt: Convert TMR path to target_submit_tmr")
Tested-by: Alex Estrin &lt;alex.estrin@intel.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Cc: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Acked-by: Benjamin Poirier &lt;bpoirier@suse.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
</entry>
<entry>
<title>srp-target: Retry when QP creation fails with ENOMEM</title>
<updated>2014-12-06T14:18:22Z</updated>
<author>
<name>Bart Van Assche</name>
</author>
<published>2014-10-19T15:05:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=090ec5fef8c36ce8cac294eddaaacf1a1cb9e56e'/>
<id>urn:sha1:090ec5fef8c36ce8cac294eddaaacf1a1cb9e56e</id>
<content type='text'>
commit ab477c1ff5e0a744c072404bf7db51bfe1f05b6e upstream.

It is not guaranteed to that srp_sq_size is supported
by the HCA. So if we failed to create the QP with ENOMEM,
try with a smaller srp_sq_size. Keep it up until we hit
MIN_SRPT_SQ_SIZE, then fail the connection.

Reported-by: Mark Lehrer &lt;lehrer@gmail.com&gt;
Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Signed-off-by: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
</entry>
<entry>
<title>ib_srpt: Use correct ib_sg_dma primitives</title>
<updated>2014-05-15T07:55:14Z</updated>
<author>
<name>Mike Marciniszyn</name>
</author>
<published>2014-04-07T17:58:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7efadd64325e55b75967a6e2b6a714f14fdce795'/>
<id>urn:sha1:7efadd64325e55b75967a6e2b6a714f14fdce795</id>
<content type='text'>
commit b076808051f2c80d38e03fb2f1294f525c7a446d upstream.

The code was incorrectly using sg_dma_address() and
sg_dma_len() instead of ib_sg_dma_address() and
ib_sg_dma_len().

This prevents srpt from functioning with the
Intel HCA and indeed will corrupt memory
badly.

Cc: Bart Van Assche &lt;bvanassche@acm.org&gt;
Reviewed-by: Dennis Dalessandro &lt;dennis.dalessandro@intel.com&gt;
Tested-by: Vinod Kumar &lt;vinod.kumar@intel.com&gt;
Signed-off-by: Mike Marciniszyn &lt;mike.marciniszyn@intel.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
</entry>
<entry>
<title>ib_srpt: always set response for task management</title>
<updated>2013-10-03T11:23:17Z</updated>
<author>
<name>Jack Wang</name>
</author>
<published>2013-09-30T08:09:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c807f64340932e19f0d2ac9b30c8381e1f60663a'/>
<id>urn:sha1:c807f64340932e19f0d2ac9b30c8381e1f60663a</id>
<content type='text'>
The SRP specification requires:

  "Response data shall be provided in any SRP_RSP response that is sent in
   response to an SRP_TSK_MGMT request (see 6.7). The information in the
   RSP_CODE field (see table 24) shall indicate the completion status of
   the task management function."

So fix this to avoid the SRP initiator interprets task management functions
that succeeded as failed.

Signed-off-by: Jack Wang &lt;jinpu.wang@profitbricks.com&gt;
Cc: stable@vger.kernel.org # 3.3+
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>ib_srpt: Destroy cm_id before destroying QP.</title>
<updated>2013-10-02T04:27:30Z</updated>
<author>
<name>Nicholas Bellinger</name>
</author>
<published>2013-09-18T19:48:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0b41d6ca616ddeb3b6c0a80e8770b6f53cd42806'/>
<id>urn:sha1:0b41d6ca616ddeb3b6c0a80e8770b6f53cd42806</id>
<content type='text'>
This patch fixes a bug where ib_destroy_cm_id() was incorrectly being called
after srpt_destroy_ch_ib() had destroyed the active QP.

This would result in the following failed SRP_LOGIN_REQ messages:

Received SRP_LOGIN_REQ with i_port_id 0x0:0x2590ffff1762bd, t_port_id 0x2c903009f8f40:0x2c903009f8f40 and it_iu_len 260 on port 1 (guid=0xfe80000000000000:0x2c903009f8f41)
Received SRP_LOGIN_REQ with i_port_id 0x0:0x2590ffff1758f9, t_port_id 0x2c903009f8f40:0x2c903009f8f40 and it_iu_len 260 on port 2 (guid=0xfe80000000000000:0x2c903009f8f42)
Received SRP_LOGIN_REQ with i_port_id 0x0:0x2590ffff175941, t_port_id 0x2c903009f8f40:0x2c903009f8f40 and it_iu_len 260 on port 2 (guid=0xfe80000000000000:0x2c90300a3cfb2)
Received SRP_LOGIN_REQ with i_port_id 0x0:0x2590ffff176299, t_port_id 0x2c903009f8f40:0x2c903009f8f40 and it_iu_len 260 on port 1 (guid=0xfe80000000000000:0x2c90300a3cfb1)
mlx4_core 0000:84:00.0: command 0x19 failed: fw status = 0x9
rejected SRP_LOGIN_REQ because creating a new RDMA channel failed.
Received SRP_LOGIN_REQ with i_port_id 0x0:0x2590ffff176299, t_port_id 0x2c903009f8f40:0x2c903009f8f40 and it_iu_len 260 on port 1 (guid=0xfe80000000000000:0x2c90300a3cfb1)
mlx4_core 0000:84:00.0: command 0x19 failed: fw status = 0x9
rejected SRP_LOGIN_REQ because creating a new RDMA channel failed.
Received SRP_LOGIN_REQ with i_port_id 0x0:0x2590ffff176299, t_port_id 0x2c903009f8f40:0x2c903009f8f40 and it_iu_len 260 on port 1 (guid=0xfe80000000000000:0x2c90300a3cfb1)

Reported-by: Navin Ahuja &lt;navin.ahuja@saratoga-speed.com&gt;
Cc: stable@vger.kernel.org # 3.3+
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: make queue_tm_rsp() return void</title>
<updated>2013-07-08T01:36:53Z</updated>
<author>
<name>Joern Engel</name>
</author>
<published>2013-07-03T15:22:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b79fafac70fc9bbe640b8193ed772eb850efdfe6'/>
<id>urn:sha1:b79fafac70fc9bbe640b8193ed772eb850efdfe6</id>
<content type='text'>
The return value wasn't checked by any of the callers.  Assuming this is
correct behaviour, we can simplify some code by not bothering to
generate it.

nab: Add srpt_queue_data_in() + srpt_queue_tm_rsp() nops around
     srpt_queue_response() void return

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>ib_srpt: Call target_sess_cmd_list_set_waiting during shutdown_session</title>
<updated>2013-05-30T04:30:46Z</updated>
<author>
<name>Nicholas Bellinger</name>
</author>
<published>2013-05-15T08:30:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1d19f7800d643b270b28d0a969c5eca455d54397'/>
<id>urn:sha1:1d19f7800d643b270b28d0a969c5eca455d54397</id>
<content type='text'>
Given that srpt_release_channel_work() calls target_wait_for_sess_cmds()
to allow outstanding se_cmd_t-&gt;cmd_kref a change to complete, the call
to perform target_sess_cmd_list_set_waiting() needs to happen in
srpt_shutdown_session()

Also, this patch adds an explicit call to srpt_shutdown_session() within
srpt_drain_channel() so that target_sess_cmd_list_set_waiting() will be
called in the cases where TFO-&gt;shutdown_session() is not triggered
directly by TCM.

Cc: Joern Engel &lt;joern@logfs.org&gt;
Cc: Roland Dreier &lt;roland@kernel.org&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Remove unused wait_for_tasks bit in target_wait_for_sess_cmds</title>
<updated>2013-05-21T04:44:10Z</updated>
<author>
<name>Joern Engel</name>
</author>
<published>2013-05-15T07:44:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=be646c2d2ba8e2e56596d72633705f8286698c25'/>
<id>urn:sha1:be646c2d2ba8e2e56596d72633705f8286698c25</id>
<content type='text'>
Drop unused transport_wait_for_tasks() check in target_wait_for_sess_cmds
shutdown code, and convert tcm_qla2xxx + ib_srpt fabric drivers.

Cc: Joern Engel &lt;joern@logfs.org&gt;
Cc: Roland Dreier &lt;roland@kernel.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>SRPT: Fix odd use of WARN_ON()</title>
<updated>2013-04-17T05:58:08Z</updated>
<author>
<name>Grant Grundler</name>
</author>
<published>2013-03-26T21:48:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=532ec6f1c0b5e936f73c607309253204866e2102'/>
<id>urn:sha1:532ec6f1c0b5e936f73c607309253204866e2102</id>
<content type='text'>
While WARN_ON("const string") will work, it's intent is not obvious.
The warning is more useful by showing the "state" value.

Signed-off-by: Grant Grundler &lt;grundler@chromium.org&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
</content>
</entry>
<entry>
<title>ib_srpt: Convert TMR path to target_submit_tmr</title>
<updated>2012-11-28T19:20:28Z</updated>
<author>
<name>Nicholas Bellinger</name>
</author>
<published>2012-11-28T09:38:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3e4f574857eebce60bb56d7524f3f9eaa2a126d0'/>
<id>urn:sha1:3e4f574857eebce60bb56d7524f3f9eaa2a126d0</id>
<content type='text'>
This patch converts the TMR path in srpt_handle_tsk_mgmt() to use
target_submit_tmr() with TARGET_SCF_ACK_KREF flag usage.

v2: Drop ununused res in target_submit_tmr (Fengguang.Wu)

Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Bart Van Assche &lt;bvanassche@acm.org&gt;
Cc: Roland Dreier &lt;roland@kernel.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
</feed>
