<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/target/target_core_tpg.c, branch v3.4.87</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>target: Fix lookup of dynamic NodeACLs during cached demo-mode operation</title>
<updated>2013-03-03T22:06:39+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2013-02-19T02:00:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3fa4f7261d75cb6b35fdf8d329f5fd64e7354c58'/>
<id>3fa4f7261d75cb6b35fdf8d329f5fd64e7354c58</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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>target: Add link_magic for fabric allow_link destination target_items</title>
<updated>2013-01-21T19:45:24+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2012-12-05T07:43:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=92a7389317838f3338466df0c0e3d23ad33cb1f4'/>
<id>92a7389317838f3338466df0c0e3d23ad33cb1f4</id>
<content type='text'>
commit 0ff8754981261a80f4b77db2536dfea92c2d4539 upstream.

This patch adds [dev,lun]_link_magic value assignment + checks within generic
target_fabric_port_link() and target_fabric_mappedlun_link() code to ensure
destination config_item *target_item sent from configfs_symlink() -&gt;
config_item_operations-&gt;allow_link() is the underlying se_device-&gt;dev_group
and se_lun-&gt;lun_group that we expect to symlink.

Reported-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Cc: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: CAI Qian &lt;caiqian@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 0ff8754981261a80f4b77db2536dfea92c2d4539 upstream.

This patch adds [dev,lun]_link_magic value assignment + checks within generic
target_fabric_port_link() and target_fabric_mappedlun_link() code to ensure
destination config_item *target_item sent from configfs_symlink() -&gt;
config_item_operations-&gt;allow_link() is the underlying se_device-&gt;dev_group
and se_lun-&gt;lun_group that we expect to symlink.

Reported-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Cc: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: CAI Qian &lt;caiqian@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>target: Drop incorrect se_lun_acl release for dynamic -&gt; explict ACL conversion</title>
<updated>2012-05-11T21:55:19+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2012-05-11T05:05:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cfebf8f42f47327fa54cf05c19b98f4bd5236a26'/>
<id>cfebf8f42f47327fa54cf05c19b98f4bd5236a26</id>
<content type='text'>
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;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>target: remove obvious warnings</title>
<updated>2012-03-16T02:16:09+00:00</updated>
<author>
<name>Jörn Engel</name>
<email>joern@logfs.org</email>
</author>
<published>2012-03-15T19:06:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=281689051a628e5341ce1efcfafde9d60f2f6fbb'/>
<id>281689051a628e5341ce1efcfafde9d60f2f6fbb</id>
<content type='text'>
Get rid of a bunch of write-only variables.  In a number of cases I
suspect actual bugs to be present, so I left all of those for a second
look.

(nab: fix lio-core patch fuzz)

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Get rid of a bunch of write-only variables.  In a number of cases I
suspect actual bugs to be present, so I left all of those for a second
look.

(nab: fix lio-core patch fuzz)

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>target: Use array_zalloc for device_list</title>
<updated>2012-03-16T02:15:51+00:00</updated>
<author>
<name>Jörn Engel</name>
<email>joern@logfs.org</email>
</author>
<published>2012-03-15T19:05:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f2083241f23722207676025abbb45a301d412e69'/>
<id>f2083241f23722207676025abbb45a301d412e69</id>
<content type='text'>
Turns an order-8 allocation into slab-sized ones, thereby preventing
allocation failures with memory fragmentation.

This likely saves memory as well, as the slab allocator can pack objects
more tightly than the buddy allocator.

(nab: Fix lio-core patch fuzz)

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Turns an order-8 allocation into slab-sized ones, thereby preventing
allocation failures with memory fragmentation.

This likely saves memory as well, as the slab allocator can pack objects
more tightly than the buddy allocator.

(nab: Fix lio-core patch fuzz)

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>target: Use array_zalloc for tpg_lun_list</title>
<updated>2012-03-16T02:15:38+00:00</updated>
<author>
<name>Jörn Engel</name>
<email>joern@logfs.org</email>
</author>
<published>2012-03-15T19:05:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4a5a75f32dcbcd0b2685f74fd4ede26edf8765a9'/>
<id>4a5a75f32dcbcd0b2685f74fd4ede26edf8765a9</id>
<content type='text'>
Turns an order-10 allocation into slab-sized ones, thereby preventing
allocation failures with memory fragmentation.

This likely saves memory as well, as the slab allocator can pack objects
more tightly than the buddy allocator.

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Turns an order-10 allocation into slab-sized ones, thereby preventing
allocation failures with memory fragmentation.

This likely saves memory as well, as the slab allocator can pack objects
more tightly than the buddy allocator.

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>target: Convert se_node_acl-&gt;acl_group removal to use -&gt;acl_kref</title>
<updated>2012-03-10T22:42:19+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2012-03-10T22:36:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=337c060701fb3d27d9945bf7af7ba194ae2153a8'/>
<id>337c060701fb3d27d9945bf7af7ba194ae2153a8</id>
<content type='text'>
This patch converts core_tpg_del_initiator_node_acl() shutdown from configfs
context to use se_node_acl-&gt;acl_kref and -&gt;acl_free_comp in order to wait for
outstanding fabric callbacks to complete via transport_deregister_session()
callbacks before waking -&gt;acl_free_comp from the last -&gt;acl_kref put.

It also changes core_tpg_del_initiator_node_acl() to setup a local sess_list
with target_get_session() + acl-&gt;acl_stop = 1 for active sessions that will
be shutdown, and changes transport_deregister_session_configfs() to check
for -&gt;acl_stop usage.

Cc: Roland Dreier &lt;roland@purestorage.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Joern Engel &lt;joern@logfs.org&gt;
Cc: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch converts core_tpg_del_initiator_node_acl() shutdown from configfs
context to use se_node_acl-&gt;acl_kref and -&gt;acl_free_comp in order to wait for
outstanding fabric callbacks to complete via transport_deregister_session()
callbacks before waking -&gt;acl_free_comp from the last -&gt;acl_kref put.

It also changes core_tpg_del_initiator_node_acl() to setup a local sess_list
with target_get_session() + acl-&gt;acl_stop = 1 for active sessions that will
be shutdown, and changes transport_deregister_session_configfs() to check
for -&gt;acl_stop usage.

Cc: Roland Dreier &lt;roland@purestorage.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Joern Engel &lt;joern@logfs.org&gt;
Cc: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>target: Add se_node_acl-&gt;acl_kref for -&gt;acl_free_comp usage</title>
<updated>2012-03-10T22:42:09+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2012-03-09T07:45:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=afb999ffc48f5e7ec18e6f8f9e68aa3d0085862d'/>
<id>afb999ffc48f5e7ec18e6f8f9e68aa3d0085862d</id>
<content type='text'>
This patch adds se_node_acl-&gt;acl_kref for use with -&gt;acl_free_comp
during explict se_node_acl release.  It adds kref_init() during
se_node_acl setup, kref_get() during __transport_register_session()
-&gt; target_put_nacl() with existing transport_deregister_session()
fabric callback usage.

It also moves transport_free_session() to release *se_sess memory
after target_put_nacl() execution in transport_deregister_session()

Cc: Roland Dreier &lt;roland@purestorage.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Joern Engel &lt;joern@logfs.org&gt;
Cc: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds se_node_acl-&gt;acl_kref for use with -&gt;acl_free_comp
during explict se_node_acl release.  It adds kref_init() during
se_node_acl setup, kref_get() during __transport_register_session()
-&gt; target_put_nacl() with existing transport_deregister_session()
fabric callback usage.

It also moves transport_free_session() to release *se_sess memory
after target_put_nacl() execution in transport_deregister_session()

Cc: Roland Dreier &lt;roland@purestorage.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Joern Engel &lt;joern@logfs.org&gt;
Cc: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>target: Add se_node_acl-&gt;acl_free_comp for NodeACL release path</title>
<updated>2012-03-10T22:41:59+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2012-03-10T22:32:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=01468346546a9bcc09035a7e8b71f78af5b7133a'/>
<id>01468346546a9bcc09035a7e8b71f78af5b7133a</id>
<content type='text'>
Add se_node_acl-&gt;acl_free_comp for NodeACL release path to wait for outstanding
fabric session shutdown to complete in transport_deregister_session() before
finishing NodeACL release from configfs process context.

Also make transport_deregister_session() clear the comp_nacl bit
to skip se_node_acl-&gt;acl_free_comp completion for dynamically generated
NodeACL during fabric session shutdown.

Cc: Roland Dreier &lt;roland@purestorage.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Joern Engel &lt;joern@logfs.org&gt;
Cc: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add se_node_acl-&gt;acl_free_comp for NodeACL release path to wait for outstanding
fabric session shutdown to complete in transport_deregister_session() before
finishing NodeACL release from configfs process context.

Also make transport_deregister_session() clear the comp_nacl bit
to skip se_node_acl-&gt;acl_free_comp completion for dynamically generated
NodeACL during fabric session shutdown.

Cc: Roland Dreier &lt;roland@purestorage.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Joern Engel &lt;joern@logfs.org&gt;
Cc: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>target: Convert session_lock to irqsave</title>
<updated>2012-03-10T21:59:03+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2011-08-31T19:34:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=140854cb72525246745b67300d35101ad2875a39'/>
<id>140854cb72525246745b67300d35101ad2875a39</id>
<content type='text'>
This patch converts the remaining struct se_portal_group-&gt;session_lock
usage to use irqsave+irqrestore to address the following warnings for
hardware target mode interrupt context usage.  This change generate
other warnings for current iscsi-target mode still using -&gt;session_lock
with spin_lock_bh, which will need to be converted in a seperate patch.

[  492.480728] [ INFO: HARDIRQ-safe -&gt; HARDIRQ-unsafe lock order detected ]
[  492.488194] 3.0.0+ #23
[  492.490820] ------------------------------------------------------
[  492.497704] sh/7162 [HC0[0]:SC0[2]:HE0:SE0] is trying to acquire:
[  492.504493] (&amp;(&amp;se_tpg-&gt;session_lock)-&gt;rlock){+.....}, at: [&lt;ffffffffa022364d&gt;] transport_deregister_session+0x2d/0x163 [target_core_mod]
  492.518390]
[  492.518390] and this task is already holding:
[  492.524897] (&amp;(&amp;ha-&gt;hardware_lock)-&gt;rlock){-.-...}, at: [&lt;ffffffffa00b9146&gt;] qla_tgt_stop_phase1+0x5e/0x27e [qla2xxx]
[  492.536856] which would create a new lock dependency:
[  492.542481] (&amp;(&amp;ha-&gt;hardware_lock)-&gt;rlock){-.-...} -&gt; (&amp;(&amp;se_tpg-&gt;session_lock)-&gt;rlock){+.....}
[  492.552321]
[  492.552321] but this new dependency connects a HARDIRQ-irq-safe lock:
[  492.561149] (&amp;(&amp;ha-&gt;hardware_lock)-&gt;rlock){-.-...}
[  492.566400] ... which became HARDIRQ-irq-safe at:
[  492.571841]   [&lt;ffffffff81064720&gt;] __lock_acquire+0x68f/0x921
[  492.578247]   [&lt;ffffffff81064eff&gt;] lock_acquire+0xe0/0x10d
[  492.584367]   [&lt;ffffffff813a74c6&gt;] _raw_spin_lock_irqsave+0x44/0x56
[  492.591358]   [&lt;ffffffffa009b1be&gt;] qla24xx_msix_default+0x5c/0x2aa [qla2xxx]
[  492.599227]   [&lt;ffffffff81088582&gt;] handle_irq_event_percpu+0x5a/0x197
[  492.606413]   [&lt;ffffffff810886fb&gt;] handle_irq_event+0x3c/0x5c
[  492.612822]   [&lt;ffffffff8108a6dc&gt;] handle_edge_irq+0xcc/0xf1
[  492.619138]   [&lt;ffffffff810039b9&gt;] handle_irq+0x83/0x8e
[  492.624971]   [&lt;ffffffff8100333e&gt;] do_IRQ+0x48/0xaf
[  492.630413]   [&lt;ffffffff813a7cd3&gt;] ret_from_intr+0x0/0x1a
[  492.636437]   [&lt;ffffffff81001dc1&gt;] cpu_idle+0x5b/0x8d
[  492.642073]   [&lt;ffffffff81392709&gt;] rest_init+0xad/0xb4
[  492.647809]   [&lt;ffffffff81a1cbbc&gt;] start_kernel+0x366/0x371
[  492.654030]   [&lt;ffffffff81a1c2b1&gt;] x86_64_start_reservations+0xb8/0xbc
[  492.661311]   [&lt;ffffffff81a1c3b6&gt;] x86_64_start_kernel+0x101/0x110
[  492.668204]
[  492.668205] to a HARDIRQ-irq-unsafe lock:
[  492.674324] (&amp;(&amp;se_tpg-&gt;session_lock)-&gt;rlock){+.....}
[  492.679862] ... which became HARDIRQ-irq-unsafe at:
[  492.685497] ...  [&lt;ffffffff8106479a&gt;] __lock_acquire+0x709/0x921
[  492.692209]   [&lt;ffffffff81064eff&gt;] lock_acquire+0xe0/0x10d
[  492.698330]   [&lt;ffffffff813a75ed&gt;] _raw_spin_lock_bh+0x31/0x40
[  492.704836]   [&lt;ffffffffa021c208&gt;] core_tpg_del_initiator_node_acl+0x89/0x336 [target_core_mod]
[  492.714546]   [&lt;ffffffffa02fb075&gt;] tcm_qla2xxx_drop_nodeacl+0x20/0x2d [tcm_qla2xxx]
[  492.723087]   [&lt;ffffffffa02108d9&gt;] target_fabric_nacl_base_release+0x22/0x24 [target_core_mod]
[  492.732698]   [&lt;ffffffffa01661c8&gt;] config_item_release+0x7d/0xa3 [configfs]
[  492.740465]   [&lt;ffffffff811d48fe&gt;] kref_put+0x43/0x4d
[  492.746101]   [&lt;ffffffffa0166149&gt;] config_item_put+0x19/0x1b [configfs]
[  492.753481]   [&lt;ffffffffa0164987&gt;] configfs_rmdir+0x1eb/0x258 [configfs]
[  492.760957]   [&lt;ffffffff810ecc54&gt;] vfs_rmdir+0x79/0xd0
[  492.766690]   [&lt;ffffffff810eec4a&gt;] do_rmdir+0xc2/0x111
[  492.772423]   [&lt;ffffffff810eecd0&gt;] sys_rmdir+0x11/0x13
[  492.778156]   [&lt;ffffffff813ae4d2&gt;] system_call_fastpath+0x16/0x1b
[  492.784953]

Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch converts the remaining struct se_portal_group-&gt;session_lock
usage to use irqsave+irqrestore to address the following warnings for
hardware target mode interrupt context usage.  This change generate
other warnings for current iscsi-target mode still using -&gt;session_lock
with spin_lock_bh, which will need to be converted in a seperate patch.

[  492.480728] [ INFO: HARDIRQ-safe -&gt; HARDIRQ-unsafe lock order detected ]
[  492.488194] 3.0.0+ #23
[  492.490820] ------------------------------------------------------
[  492.497704] sh/7162 [HC0[0]:SC0[2]:HE0:SE0] is trying to acquire:
[  492.504493] (&amp;(&amp;se_tpg-&gt;session_lock)-&gt;rlock){+.....}, at: [&lt;ffffffffa022364d&gt;] transport_deregister_session+0x2d/0x163 [target_core_mod]
  492.518390]
[  492.518390] and this task is already holding:
[  492.524897] (&amp;(&amp;ha-&gt;hardware_lock)-&gt;rlock){-.-...}, at: [&lt;ffffffffa00b9146&gt;] qla_tgt_stop_phase1+0x5e/0x27e [qla2xxx]
[  492.536856] which would create a new lock dependency:
[  492.542481] (&amp;(&amp;ha-&gt;hardware_lock)-&gt;rlock){-.-...} -&gt; (&amp;(&amp;se_tpg-&gt;session_lock)-&gt;rlock){+.....}
[  492.552321]
[  492.552321] but this new dependency connects a HARDIRQ-irq-safe lock:
[  492.561149] (&amp;(&amp;ha-&gt;hardware_lock)-&gt;rlock){-.-...}
[  492.566400] ... which became HARDIRQ-irq-safe at:
[  492.571841]   [&lt;ffffffff81064720&gt;] __lock_acquire+0x68f/0x921
[  492.578247]   [&lt;ffffffff81064eff&gt;] lock_acquire+0xe0/0x10d
[  492.584367]   [&lt;ffffffff813a74c6&gt;] _raw_spin_lock_irqsave+0x44/0x56
[  492.591358]   [&lt;ffffffffa009b1be&gt;] qla24xx_msix_default+0x5c/0x2aa [qla2xxx]
[  492.599227]   [&lt;ffffffff81088582&gt;] handle_irq_event_percpu+0x5a/0x197
[  492.606413]   [&lt;ffffffff810886fb&gt;] handle_irq_event+0x3c/0x5c
[  492.612822]   [&lt;ffffffff8108a6dc&gt;] handle_edge_irq+0xcc/0xf1
[  492.619138]   [&lt;ffffffff810039b9&gt;] handle_irq+0x83/0x8e
[  492.624971]   [&lt;ffffffff8100333e&gt;] do_IRQ+0x48/0xaf
[  492.630413]   [&lt;ffffffff813a7cd3&gt;] ret_from_intr+0x0/0x1a
[  492.636437]   [&lt;ffffffff81001dc1&gt;] cpu_idle+0x5b/0x8d
[  492.642073]   [&lt;ffffffff81392709&gt;] rest_init+0xad/0xb4
[  492.647809]   [&lt;ffffffff81a1cbbc&gt;] start_kernel+0x366/0x371
[  492.654030]   [&lt;ffffffff81a1c2b1&gt;] x86_64_start_reservations+0xb8/0xbc
[  492.661311]   [&lt;ffffffff81a1c3b6&gt;] x86_64_start_kernel+0x101/0x110
[  492.668204]
[  492.668205] to a HARDIRQ-irq-unsafe lock:
[  492.674324] (&amp;(&amp;se_tpg-&gt;session_lock)-&gt;rlock){+.....}
[  492.679862] ... which became HARDIRQ-irq-unsafe at:
[  492.685497] ...  [&lt;ffffffff8106479a&gt;] __lock_acquire+0x709/0x921
[  492.692209]   [&lt;ffffffff81064eff&gt;] lock_acquire+0xe0/0x10d
[  492.698330]   [&lt;ffffffff813a75ed&gt;] _raw_spin_lock_bh+0x31/0x40
[  492.704836]   [&lt;ffffffffa021c208&gt;] core_tpg_del_initiator_node_acl+0x89/0x336 [target_core_mod]
[  492.714546]   [&lt;ffffffffa02fb075&gt;] tcm_qla2xxx_drop_nodeacl+0x20/0x2d [tcm_qla2xxx]
[  492.723087]   [&lt;ffffffffa02108d9&gt;] target_fabric_nacl_base_release+0x22/0x24 [target_core_mod]
[  492.732698]   [&lt;ffffffffa01661c8&gt;] config_item_release+0x7d/0xa3 [configfs]
[  492.740465]   [&lt;ffffffff811d48fe&gt;] kref_put+0x43/0x4d
[  492.746101]   [&lt;ffffffffa0166149&gt;] config_item_put+0x19/0x1b [configfs]
[  492.753481]   [&lt;ffffffffa0164987&gt;] configfs_rmdir+0x1eb/0x258 [configfs]
[  492.760957]   [&lt;ffffffff810ecc54&gt;] vfs_rmdir+0x79/0xd0
[  492.766690]   [&lt;ffffffff810eec4a&gt;] do_rmdir+0xc2/0x111
[  492.772423]   [&lt;ffffffff810eecd0&gt;] sys_rmdir+0x11/0x13
[  492.778156]   [&lt;ffffffff813ae4d2&gt;] system_call_fastpath+0x16/0x1b
[  492.784953]

Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
