<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/target, branch v3.4.19</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/target?h=v3.4.19</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/target?h=v3.4.19'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-11-17T21:15:55Z</updated>
<entry>
<title>target: Fix incorrect usage of nested IRQ spinlocks in ABORT_TASK path</title>
<updated>2012-11-17T21:15:55Z</updated>
<author>
<name>Steve Hodgson</name>
<email>steve@purestorage.com</email>
</author>
<published>2012-10-31T17:24:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bfc5de3bc907e97b9aabce6d6517a55d5ed6d791'/>
<id>urn:sha1:bfc5de3bc907e97b9aabce6d6517a55d5ed6d791</id>
<content type='text'>
commit ab74b3d62f05192bf8fb8f169e7999d1183b2e08 upstream.

This patch changes core_tmr_abort_task() to use spin_lock -&gt; spin_unlock
around se_cmd-&gt;t_state_lock while spin_lock_irqsave is held via
se_sess-&gt;sess_cmd_lock.

Signed-off-by: Steve Hodgson &lt;steve@purestorage.com&gt;
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>iscsi-target: Fix missed wakeup race in TX thread</title>
<updated>2012-11-17T21:15:55Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2012-10-31T16:16:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7f83bc1f1bff2e9b89b3a505750b067f0073fe5c'/>
<id>urn:sha1:7f83bc1f1bff2e9b89b3a505750b067f0073fe5c</id>
<content type='text'>
commit d5627acba9ae584cf4928af19f7ddf5f6837de32 upstream.

The sleeping code in iscsi_target_tx_thread() is susceptible to the classic
missed wakeup race:

 - TX thread finishes handle_immediate_queue() and handle_response_queue(),
   thinks both queues are empty.
 - Another thread adds a queue entry and does wake_up_process(), which does
   nothing because the TX thread is still awake.
 - TX thread does schedule_timeout() and sleeps forever.

In practice this can kill an iSCSI connection if for example an initiator
does single-threaded writes and the target misses the wakeup window when
queueing an R2T; in this case the connection will be stuck until the
initiator loses patience and does some task management operation (or kills
the connection entirely).

Fix this by converting to wait_event_interruptible(), which does not
suffer from this sort of race.

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Cc: Andy Grover &lt;agrover@redhat.com&gt;
Cc: Hannes Reinecke &lt;hare@suse.de&gt;
Cc: 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: Avoid integer overflow in se_dev_align_max_sectors()</title>
<updated>2012-11-17T21:15:55Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2012-10-31T16:16:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=227ab73196544a25f0c03338c5b49d3fdc1d1e38'/>
<id>urn:sha1:227ab73196544a25f0c03338c5b49d3fdc1d1e38</id>
<content type='text'>
commit 3e03989b5868acf69a391a424dc71fcd6cc48167 upstream.

The expression (max_sectors * block_size) might overflow a u32
(indeed, since iblock sets max_hw_sectors to UINT_MAX, it is
guaranteed to overflow and end up with a much-too-small result in many
common cases).  Fix this by doing an equivalent calculation that
doesn't require multiplication.

While we're touching this code, avoid splitting a printk format across
two lines and use pr_info(...) instead of printk(KERN_INFO ...).

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: Don't return success from module_init() if setup fails</title>
<updated>2012-11-17T21:15:55Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2012-10-31T16:16:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=506485a3c6d926cc01e6d05088eac94adf1d6ae5'/>
<id>urn:sha1:506485a3c6d926cc01e6d05088eac94adf1d6ae5</id>
<content type='text'>
commit 0d0f9dfb31e0a6c92063e235417b42df185b3275 upstream.

If the call to core_dev_release_virtual_lun0() fails, then nothing
sets ret to anything other than 0, so even though everything is
torn down and freed, target_core_init_configfs() will seem to succeed
and the module will be loaded.  Fix this by passing the return value
on up the chain.

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: Fix double-free of se_cmd in target_complete_tmr_failure</title>
<updated>2012-11-05T08:50:42Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2012-10-26T22:35:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8c9c9dfcd1d31e2f149ea991f15bfdd4b5e1496e'/>
<id>urn:sha1:8c9c9dfcd1d31e2f149ea991f15bfdd4b5e1496e</id>
<content type='text'>
commit e13d5fef88c40b87c8430f8274c3a9ca32ef90bc upstream.

Fabric drivers currently expect to internally release se_cmd in the event
of a TMR failure during target_submit_tmr(), which means the immediate call
to transport_generic_free_cmd() after TFO-&gt;queue_tm_rsp() from within
target_complete_tmr_failure() workqueue context is wrong.

This is done as some fabrics expect TMR operations to be acknowledged
before releasing the descriptor, so the assumption that core is releasing
se_cmd associated TMR memory is incorrect.  This fixes a OOPs where
transport_generic_free_cmd() was being called more than once.

This bug was originally observed with tcm_qla2xxx fabric ports.

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

</content>
</entry>
<entry>
<title>target: fix return code in target_core_init_configfs error path</title>
<updated>2012-10-21T16:27:58Z</updated>
<author>
<name>Peter Senna Tschudin</name>
<email>peter.senna@gmail.com</email>
</author>
<published>2012-09-17T18:05:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e1621ec4754097582c73c0ed8c394dcc50b1e0fd'/>
<id>urn:sha1:e1621ec4754097582c73c0ed8c394dcc50b1e0fd</id>
<content type='text'>
commit 37bb7899ca366dc212b71b150e78566d04808cc0 upstream.

This patch fixes error cases within target_core_init_configfs() to
properly set ret = -ENOMEM before jumping to the out_global exception
path.

This was originally discovered with the following Coccinelle semantic
match information:

Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.  A simplified version of the semantic match
that finds this problem is as follows: (http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
(
if@p1 (\(ret &lt; 0\|ret != 0\))
 { ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
    when != &amp;ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}
// &lt;/smpl&gt;

Signed-off-by: Peter Senna Tschudin &lt;peter.senna@gmail.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>iscsi-target: Bump defaults for nopin_timeout + nopin_response_timeout values</title>
<updated>2012-10-21T16:27:58Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2012-10-03T22:42:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2a7c11208e542071eee2240dde98e1673f5c01d4'/>
<id>urn:sha1:2a7c11208e542071eee2240dde98e1673f5c01d4</id>
<content type='text'>
commit cf0eb28d3ba60098865bf7dbcbfdd6b1cc483e3b upstream.

This patch increases the default for nopin_timeout to 15 seconds (wait
between sending a new NopIN ping) and nopin_response_timeout to 30 seconds
(wait for NopOUT response before failing the connection) in order to avoid
false positives by iSCSI Initiators who are not always able (under load) to
respond to NopIN echo PING requests within the current 5 second window.

False positives have been observed recently using Open-iSCSI code on v3.3.x
with heavy large-block READ workloads over small MTU 1 Gb/sec ports, and
increasing these values to more reasonable defaults significantly reduces
the possibility of false positive NopIN response timeout events under
this specific workload.

Historically these have been set low to initiate connection recovery as
soon as possible if we don't hear a ping back, but for modern v3.x code
on 1 -&gt; 10 Gb/sec ports these new defaults make alot more sense.

Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Andy Grover &lt;agrover@redhat.com&gt;
Cc: Mike Christie &lt;michaelc@cs.wisc.edu&gt;
Cc: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>iscsi-target: Add explicit set of cache_dynamic_acls=1 for TPG demo-mode</title>
<updated>2012-10-21T16:27:58Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2012-09-30T19:20:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a114a8b43b038c327aff0298cfb69509469e84b4'/>
<id>urn:sha1:a114a8b43b038c327aff0298cfb69509469e84b4</id>
<content type='text'>
commit 38b11bae6ba02da352340aff12ee25755977b222 upstream.

We've had reports in the past about this specific case, so it's time to
go ahead and explicitly set cache_dynamic_acls=1 for generate_node_acls=1
(TPG demo-mode) operation.

During normal generate_node_acls=0 operation with explicit NodeACLs -&gt;
se_node_acl memory is persistent to the configfs group located at
/sys/kernel/config/target/$TARGETNAME/$TPGT/acls/$INITIATORNAME, so in
the generate_node_acls=1 case we want the reservation logic to reference
existing per initiator IQN se_node_acl memory (not to generate a new
se_node_acl), so go ahead and always set cache_dynamic_acls=1 when
TPG demo-mode is enabled.

Reported-by: Ronnie Sahlberg &lt;ronniesahlberg@gmail.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>iscsit: remove incorrect unlock in iscsit_build_sendtargets_resp</title>
<updated>2012-10-21T16:27:58Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@infradead.org</email>
</author>
<published>2012-09-26T12:00:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b095d61243b5f2333e2ae11a9051cd9d47597002'/>
<id>urn:sha1:b095d61243b5f2333e2ae11a9051cd9d47597002</id>
<content type='text'>
commit 904753da183566c71211d23c169a80184648c121 upstream.

Fix a potential multiple spin-unlock -&gt; deadlock scenario during the
overflow check within iscsit_build_sendtargets_resp() as found by
sparse static checking.

Signed-off-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>iscsi-target: Correctly set 0xffffffff field within ISCSI_OP_REJECT PDU</title>
<updated>2012-10-21T16:27:58Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2012-09-23T00:21:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1faef9285ad868082403da1cec5adefc0c505c2e'/>
<id>urn:sha1:1faef9285ad868082403da1cec5adefc0c505c2e</id>
<content type='text'>
commit f25590f39d543272f7ae7b00d533359c8d7ff331 upstream.

This patch adds a missing iscsi_reject-&gt;ffffffff assignment within
iscsit_send_reject() code to properly follow RFC-3720 Section 10.17
Bytes 16 -&gt; 19 for the PDU format definition of ISCSI_OP_REJECT.

We've not seen any initiators care about this bytes in practice, but
as Ronnie reported this was causing trouble with wireshark packet
decoding lets go ahead and fix this up now.

Reported-by: Ronnie Sahlberg &lt;ronniesahlberg@gmail.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>
