<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/target, branch v3.2.41</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/target?h=v3.2.41</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/target?h=v3.2.41'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-03-06T03:24:04Z</updated>
<entry>
<title>target: Add missing mapped_lun bounds checking during make_mappedlun setup</title>
<updated>2013-03-06T03:24:04Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2013-02-19T02:31:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5f5db37d7a8f41489e766a137dd25409a020c677'/>
<id>urn:sha1:5f5db37d7a8f41489e766a137dd25409a020c677</id>
<content type='text'>
commit fbbf8555a986ed31e54f006b6cc637ea4ff1425b upstream.

This patch adds missing bounds checking for the configfs provided
mapped_lun value during target_fabric_make_mappedlun() setup ahead
of se_lun_acl initialization.

This addresses a potential OOPs when using a mapped_lun value that
exceeds the hardcoded TRANSPORT_MAX_LUNS_PER_TPG-1 value within
se_node_acl-&gt;device_list[].

Reported-by: Jan Engelhardt &lt;jengelh@inai.de&gt;
Cc: Jan Engelhardt &lt;jengelh@inai.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>target: Fix lookup of dynamic NodeACLs during cached demo-mode operation</title>
<updated>2013-03-06T03:24:03Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2013-02-19T02:00:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f310bed9032a920cc5c7adb873caa0191fdf760e'/>
<id>urn:sha1:f310bed9032a920cc5c7adb873caa0191fdf760e</id>
<content type='text'>
commit fcf29481fb8e106daad6688f2e898226ee928992 upstream.

This patch fixes a bug in core_tpg_check_initiator_node_acl() -&gt;
core_tpg_get_initiator_node_acl() where a dynamically created
se_node_acl generated during session login would be skipped during
subsequent lookup due to the '!acl-&gt;dynamic_node_acl' check, causing
a new se_node_acl to be created with a duplicate -&gt;initiatorname.

This would occur when a fabric endpoint was configured with
TFO-&gt;tpg_check_demo_mode()=1 + TPF-&gt;tpg_check_demo_mode_cache()=1
preventing the release of an existing se_node_acl during se_session
shutdown.

Also, drop the unnecessary usage of core_tpg_get_initiator_node_acl()
within core_dev_init_initiator_node_lun_acl() that originally
required the extra '!acl-&gt;dynamic_node_acl' check, and just pass
the configfs provided se_node_acl pointer instead.

Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
[bwh: Backported to 3.2: adjust context, filename of header]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>tcm_fc: Do not report target role when target is not defined</title>
<updated>2013-02-06T04:33:29Z</updated>
<author>
<name>Mark Rustad</name>
<email>mark.d.rustad@intel.com</email>
</author>
<published>2012-12-21T18:58:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e14478a19adaffac219b268b2e1bece3bde9572a'/>
<id>urn:sha1:e14478a19adaffac219b268b2e1bece3bde9572a</id>
<content type='text'>
commit edec8dfefa1f372b2dd8197da555352e76a10c03 upstream.

Clear the target role when no target is provided for
the node performing a PRLI.

Signed-off-by: Mark Rustad &lt;mark.d.rustad@intel.com&gt;
Reviewed-by: Bhanu Prakash Gollapudi &lt;bprakash@broadcom.com&gt;
Acked by Robert Love &lt;robert.w.love@intel.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>tcm_fc: Do not indicate retry capability to initiators</title>
<updated>2013-02-06T04:33:28Z</updated>
<author>
<name>Mark Rustad</name>
<email>mark.d.rustad@intel.com</email>
</author>
<published>2012-12-21T18:58:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5b0877634e54f1ca3041aed21b449250b86d5b38'/>
<id>urn:sha1:5b0877634e54f1ca3041aed21b449250b86d5b38</id>
<content type='text'>
commit f2eeba214bcd0215b7f558cab6420e5fd153042b upstream.

When generating a PRLI response to an initiator, clear the
FCP_SPPF_RETRY bit in the response.

Signed-off-by: Mark Rustad &lt;mark.d.rustad@intel.com&gt;
Reviewed-by: Bhanu Prakash Gollapudi &lt;bprakash@broadcom.com&gt;
Acked by Robert Love &lt;robert.w.love@intel.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>target: use correct sense code for LUN communication failure</title>
<updated>2013-02-06T04:33:27Z</updated>
<author>
<name>Hannes Reinecke</name>
<email>hare@suse.de</email>
</author>
<published>2012-12-17T08:53:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b60dc9751a36324ac4f68579d8dd3d415a58205e'/>
<id>urn:sha1:b60dc9751a36324ac4f68579d8dd3d415a58205e</id>
<content type='text'>
commit 18a9df42d53fabfa43b78be1104838cc8b9762e1 upstream.

The ASC/ASCQ code for 'Logical Unit Communication failure' is
0x08/0x00; 0x80/0x00 is vendor specific.

Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Cc: Nicholas Bellinger &lt;nab@risingtidesystems.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
[bwh: Backported to 3.2: add offset to buffer index]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>target/tcm_fc: fix the lockdep warning due to inconsistent lock state</title>
<updated>2013-01-03T03:33:38Z</updated>
<author>
<name>Yi Zou</name>
<email>yi.zou@intel.com</email>
</author>
<published>2012-12-11T01:04:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=14f1aeda0684a4c0286065bd1a3a05906825ed32'/>
<id>urn:sha1:14f1aeda0684a4c0286065bd1a3a05906825ed32</id>
<content type='text'>
commit 9f4ad44b264f8bb61ffdd607148215566568430d upstream.

The lockdep warning below is in theory correct but it will be in really weird
rare situation that ends up that deadlock since the tcm fc session is hashed
based the rport id. Nonetheless, the complaining below is about rcu callback
that does the transport_deregister_session() is happening in softirq, where
transport_register_session() that happens earlier is not. This triggers the
lockdep warning below. So, just fix this to make lockdep happy by disabling
the soft irq before calling transport_register_session() in ft_prli.

BTW, this was found in FCoE VN2VN over two VMs, couple of create and destroy
would get this triggered.

v1: was enforcing register to be in softirq context which was not righ. See,
http://www.spinics.net/lists/target-devel/msg03614.html

v2: following comments from Roland&amp;Nick (thanks), it seems we don't have to
do transport_deregister_session() in rcu callback, so move it into ft_sess_free()
but still do kfree() of the corresponding ft_sess struct in rcu callback to
make sure the ft_sess is not freed till the rcu callback.

...
[ 1328.370592] scsi2 : FCoE Driver
[ 1328.383429] fcoe: No FDMI support.
[ 1328.384509] host2: libfc: Link up on port (000000)
[ 1328.934229] host2: Assigned Port ID 00a292
[ 1357.232132] host2: rport 00a393: Remove port
[ 1357.232568] host2: rport 00a393: Port sending LOGO from Ready state
[ 1357.233692] host2: rport 00a393: Delete port
[ 1357.234472] host2: rport 00a393: work event 3
[ 1357.234969] host2: rport 00a393: callback ev 3
[ 1357.235979] host2: rport 00a393: Received a LOGO response closed
[ 1357.236706] host2: rport 00a393: work delete
[ 1357.237481]
[ 1357.237631] =================================
[ 1357.238064] [ INFO: inconsistent lock state ]
[ 1357.238450] 3.7.0-rc7-yikvm+ #3 Tainted: G           O
[ 1357.238450] ---------------------------------
[ 1357.238450] inconsistent {SOFTIRQ-ON-W} -&gt; {IN-SOFTIRQ-W} usage.
[ 1357.238450] ksoftirqd/0/3 [HC0[0]:SC1[1]:HE0:SE0] takes:
[ 1357.238450]  (&amp;(&amp;se_tpg-&gt;session_lock)-&gt;rlock){+.?...}, at: [&lt;ffffffffa01eacd4&gt;] transport_deregister_session+0x41/0x148 [target_core_mod]
[ 1357.238450] {SOFTIRQ-ON-W} state was registered at:
[ 1357.238450]   [&lt;ffffffff810834f5&gt;] mark_held_locks+0x6d/0x95
[ 1357.238450]   [&lt;ffffffff8108364a&gt;] trace_hardirqs_on_caller+0x12d/0x197
[ 1357.238450]   [&lt;ffffffff810836c1&gt;] trace_hardirqs_on+0xd/0xf
[ 1357.238450]   [&lt;ffffffff8149caba&gt;] _raw_spin_unlock_irq+0x2d/0x45
[ 1357.238450]   [&lt;ffffffffa01e8d10&gt;] __transport_register_session+0xb8/0x122 [target_core_mod]
[ 1357.238450]   [&lt;ffffffffa01e8dbe&gt;] transport_register_session+0x44/0x5a [target_core_mod]
[ 1357.238450]   [&lt;ffffffffa018e32c&gt;] ft_prli+0x1e3/0x275 [tcm_fc]
[ 1357.238450]   [&lt;ffffffffa0160e8d&gt;] fc_rport_recv_req+0x95e/0xdc5 [libfc]
[ 1357.238450]   [&lt;ffffffffa015be88&gt;] fc_lport_recv_els_req+0xc4/0xd5 [libfc]
[ 1357.238450]   [&lt;ffffffffa015c778&gt;] fc_lport_recv_req+0x12f/0x18f [libfc]
[ 1357.238450]   [&lt;ffffffffa015a6d7&gt;] fc_exch_recv+0x8ba/0x981 [libfc]
[ 1357.238450]   [&lt;ffffffffa0176d7a&gt;] fcoe_percpu_receive_thread+0x47a/0x4e2 [fcoe]
[ 1357.238450]   [&lt;ffffffff810549f1&gt;] kthread+0xb1/0xb9
[ 1357.238450]   [&lt;ffffffff814a40ec&gt;] ret_from_fork+0x7c/0xb0
[ 1357.238450] irq event stamp: 275411
[ 1357.238450] hardirqs last  enabled at (275410): [&lt;ffffffff810bb6a0&gt;] rcu_process_callbacks+0x229/0x42a
[ 1357.238450] hardirqs last disabled at (275411): [&lt;ffffffff8149c2f7&gt;] _raw_spin_lock_irqsave+0x22/0x8e
[ 1357.238450] softirqs last  enabled at (275394): [&lt;ffffffff8103d669&gt;] __do_softirq+0x246/0x26f
[ 1357.238450] softirqs last disabled at (275399): [&lt;ffffffff8103d6bb&gt;] run_ksoftirqd+0x29/0x62
[ 1357.238450]
[ 1357.238450] other info that might help us debug this:
[ 1357.238450]  Possible unsafe locking scenario:
[ 1357.238450]
[ 1357.238450]        CPU0
[ 1357.238450]        ----
[ 1357.238450]   lock(&amp;(&amp;se_tpg-&gt;session_lock)-&gt;rlock);
[ 1357.238450]   &lt;Interrupt&gt;
[ 1357.238450]     lock(&amp;(&amp;se_tpg-&gt;session_lock)-&gt;rlock);
[ 1357.238450]
[ 1357.238450]  *** DEADLOCK ***
[ 1357.238450]
[ 1357.238450] no locks held by ksoftirqd/0/3.
[ 1357.238450]
[ 1357.238450] stack backtrace:
[ 1357.238450] Pid: 3, comm: ksoftirqd/0 Tainted: G           O 3.7.0-rc7-yikvm+ #3
[ 1357.238450] Call Trace:
[ 1357.238450]  [&lt;ffffffff8149399a&gt;] print_usage_bug+0x1f5/0x206
[ 1357.238450]  [&lt;ffffffff8100da59&gt;] ? save_stack_trace+0x2c/0x49
[ 1357.238450]  [&lt;ffffffff81082aae&gt;] ? print_irq_inversion_bug.part.14+0x1ae/0x1ae
[ 1357.238450]  [&lt;ffffffff81083336&gt;] mark_lock+0x106/0x258
[ 1357.238450]  [&lt;ffffffff81084e34&gt;] __lock_acquire+0x2e7/0xe53
[ 1357.238450]  [&lt;ffffffff8102903d&gt;] ? pvclock_clocksource_read+0x48/0xb4
[ 1357.238450]  [&lt;ffffffff810ba6a3&gt;] ? rcu_process_gp_end+0xc0/0xc9
[ 1357.238450]  [&lt;ffffffffa01eacd4&gt;] ? transport_deregister_session+0x41/0x148 [target_core_mod]
[ 1357.238450]  [&lt;ffffffff81085ef1&gt;] lock_acquire+0x119/0x143
[ 1357.238450]  [&lt;ffffffffa01eacd4&gt;] ? transport_deregister_session+0x41/0x148 [target_core_mod]
[ 1357.238450]  [&lt;ffffffff8149c329&gt;] _raw_spin_lock_irqsave+0x54/0x8e
[ 1357.238450]  [&lt;ffffffffa01eacd4&gt;] ? transport_deregister_session+0x41/0x148 [target_core_mod]
[ 1357.238450]  [&lt;ffffffffa01eacd4&gt;] transport_deregister_session+0x41/0x148 [target_core_mod]
[ 1357.238450]  [&lt;ffffffff810bb6a0&gt;] ? rcu_process_callbacks+0x229/0x42a
[ 1357.238450]  [&lt;ffffffffa018ddc5&gt;] ft_sess_rcu_free+0x17/0x24 [tcm_fc]
[ 1357.238450]  [&lt;ffffffffa018ddae&gt;] ? ft_sess_free+0x1b/0x1b [tcm_fc]
[ 1357.238450]  [&lt;ffffffff810bb6d7&gt;] rcu_process_callbacks+0x260/0x42a
[ 1357.238450]  [&lt;ffffffff8103d55d&gt;] __do_softirq+0x13a/0x26f
[ 1357.238450]  [&lt;ffffffff8149b34e&gt;] ? __schedule+0x65f/0x68e
[ 1357.238450]  [&lt;ffffffff8103d6bb&gt;] run_ksoftirqd+0x29/0x62
[ 1357.238450]  [&lt;ffffffff8105c83c&gt;] smpboot_thread_fn+0x1a5/0x1aa
[ 1357.238450]  [&lt;ffffffff8105c697&gt;] ? smpboot_unregister_percpu_thread+0x47/0x47
[ 1357.238450]  [&lt;ffffffff810549f1&gt;] kthread+0xb1/0xb9
[ 1357.238450]  [&lt;ffffffff8149b49d&gt;] ? wait_for_common+0xbb/0x10a
[ 1357.238450]  [&lt;ffffffff81054940&gt;] ? __init_kthread_worker+0x59/0x59
[ 1357.238450]  [&lt;ffffffff814a40ec&gt;] ret_from_fork+0x7c/0xb0
[ 1357.238450]  [&lt;ffffffff81054940&gt;] ? __init_kthread_worker+0x59/0x59
[ 1417.440099]  rport-2:0-0: blocked FC remote port time out: removing rport

Signed-off-by: Yi Zou &lt;yi.zou@intel.com&gt;
Cc: Open-FCoE &lt;devel@open-fcoe.org&gt;
Cc: Nicholas A. Bellinger &lt;nab@risingtidesystems.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>target/file: Fix 32-bit highmem breakage for SGL -&gt; iovec mapping</title>
<updated>2013-01-03T03:33:29Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2012-12-05T11:08:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1506cb20191c0b33ae0c6cedac7a0ebf4fee3cf7'/>
<id>urn:sha1:1506cb20191c0b33ae0c6cedac7a0ebf4fee3cf7</id>
<content type='text'>
commit 40ff2c3b3da35dd3a00ac6722056a59b4b3f2caf upstream.

This patch changes vectored file I/O to use kmap + kunmap when mapping
incoming SGL memory -&gt; struct iovec in order to properly support 32-bit
highmem configurations.  This is because an extra bounce buffer may be
required when processing scatterlist pages allocated with GFP_KERNEL.

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
[bwh: Backported to 3.2: use task-&gt;task_sg{,_nents} for iteration]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>iscsit: use GFP_ATOMIC under spin lock</title>
<updated>2013-01-03T03:33:18Z</updated>
<author>
<name>Wei Yongjun</name>
<email>yongjun_wei@trendmicro.com.cn</email>
</author>
<published>2012-11-23T04:07:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=173dedb8464984b58d2fdec39c09486a1b6b036e'/>
<id>urn:sha1:173dedb8464984b58d2fdec39c09486a1b6b036e</id>
<content type='text'>
commit 3c989d7603872bf878840f7ce3ea49b73bea4c6c upstream.

The function iscsit_build_conn_drop_async_message() is called
from iscsit_close_connection() with spin lock 'sess-&gt;conn_lock'
held, so we should use GFP_ATOMIC instead of GFP_KERNEL.

Signed-off-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>iscsi-target: Always send a response before terminating iSCSI connection</title>
<updated>2013-01-03T03:33:03Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2012-11-06T02:02:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9ef928b0104af7c05b03f6a40bffe225b4f4c9e4'/>
<id>urn:sha1:9ef928b0104af7c05b03f6a40bffe225b4f4c9e4</id>
<content type='text'>
commit 1c5c12c666fda27c7c494b34934a0a0631a48130 upstream.

There are some cases, for example when the initiator sends an
out-of-bounds ErrorRecoveryLevel value, where the iSCSI target
terminates the connection without sending back any error.  Audit the
login path and add appropriate iscsit_tx_login_rsp() calls to make
sure this doesn't happen.

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>iscsi-target: Fix missed wakeup race in TX thread</title>
<updated>2012-11-16T16:47:07Z</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=620cc1df7f260855bfa05f56483ced4be702d57b'/>
<id>urn:sha1:620cc1df7f260855bfa05f56483ced4be702d57b</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: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
</feed>
