<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/scsi/libfc/fc_exch.c, branch linux-4.3.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.3.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.3.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2015-08-12T18:23:30Z</updated>
<entry>
<title>libfc: Fix fc_exch_recv_req() error path</title>
<updated>2015-08-12T18:23:30Z</updated>
<author>
<name>Bart Van Assche</name>
<email>bart.vanassche@sandisk.com</email>
</author>
<published>2015-06-05T21:20:46Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f6979adeaab578f8ca14fdd32b06ddee0d9d3314'/>
<id>urn:sha1:f6979adeaab578f8ca14fdd32b06ddee0d9d3314</id>
<content type='text'>
Due to patch "libfc: Do not invoke the response handler after
fc_exch_done()" (commit ID 7030fd62) the lport_recv() call
in fc_exch_recv_req() is passed a dangling pointer. Avoid this
by moving the fc_frame_free() call from fc_invoke_resp() to its
callers. This patch fixes the following crash:

general protection fault: 0000 [#3] PREEMPT SMP
RIP: fc_lport_recv_req+0x72/0x280 [libfc]
Call Trace:
 fc_exch_recv+0x642/0xde0 [libfc]
 fcoe_percpu_receive_thread+0x46a/0x5ed [fcoe]
 kthread+0x10a/0x120
 ret_from_fork+0x42/0x70

Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Vasu Dev &lt;vasu.dev@intel.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Odin.com&gt;
</content>
</entry>
<entry>
<title>libfc: Do not invoke the response handler after fc_exch_done()</title>
<updated>2013-09-04T20:45:22Z</updated>
<author>
<name>Bart Van Assche</name>
<email>bvanassche@acm.org</email>
</author>
<published>2013-08-17T20:34:43Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7030fd626129ec4d616784516a462d317c251d39'/>
<id>urn:sha1:7030fd626129ec4d616784516a462d317c251d39</id>
<content type='text'>
While the FCoE initiator driver invokes fc_exch_done() from inside
the libfc response handler, FCoE target drivers typically invoke
fc_exch_done() from outside the libfc response handler. The object
fc_exch.arg points at may disappear as soon as fc_exch_done() has
finished. So it's important not to invoke the response handler
function after fc_exch_done() has finished. Modify libfc such that
this guarantee is provided if fc_exch_done() is invoked from
outside a response handler. This patch fixes a sporadic crash in
FCoE target implementations after a command has been aborted.

Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Cc: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: Robert Love &lt;robert.w.love@intel.com&gt;
</content>
</entry>
<entry>
<title>libfc: Reduce exchange lock contention in fc_exch_recv_abts()</title>
<updated>2013-09-04T20:37:53Z</updated>
<author>
<name>Bart Van Assche</name>
<email>bvanassche@acm.org</email>
</author>
<published>2013-08-14T15:38:24Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f95b35cfcacadac16dbc5477fd22b0786256a3d1'/>
<id>urn:sha1:f95b35cfcacadac16dbc5477fd22b0786256a3d1</id>
<content type='text'>
Reduce the time during which the exchange lock is held by allocating
a frame before obtaining the exchange lock.

Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Cc: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: Robert Love &lt;robert.w.love@intel.com&gt;
</content>
</entry>
<entry>
<title>libfc: Avoid that sending after an abort triggers a kernel warning</title>
<updated>2013-09-04T20:30:43Z</updated>
<author>
<name>Bart Van Assche</name>
<email>bvanassche@acm.org</email>
</author>
<published>2013-08-14T15:37:52Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=cae7b6dd6c569f18f5c8e3f33cac60fbaeb58140'/>
<id>urn:sha1:cae7b6dd6c569f18f5c8e3f33cac60fbaeb58140</id>
<content type='text'>
Calling fc_seq_send() after an ABTS message has been received triggers
a kernel warning (WARN_ON(!(ep-&gt;esb_stat &amp; ESB_ST_SEQ_INIT))). Avoid
this by returning -ENXIO to the caller if fc_seq_send() is invoked after
an ABTS message has been received.

Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Cc: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: Robert Love &lt;robert.w.love@intel.com&gt;
</content>
</entry>
<entry>
<title>libfc: Protect ep-&gt;esb_stat changes via ex_lock</title>
<updated>2013-09-04T20:23:38Z</updated>
<author>
<name>Bart Van Assche</name>
<email>bvanassche@acm.org</email>
</author>
<published>2013-08-14T15:37:08Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5d73bea2d3a004698d16ba5face89f0bef383e76'/>
<id>urn:sha1:5d73bea2d3a004698d16ba5face89f0bef383e76</id>
<content type='text'>
This patch avoids that the WARN_ON(!(ep-&gt;esb_stat &amp; ESB_ST_SEQ_INIT))
statement in fc_seq_send_locked() gets triggered sporadically when
running FCoE target code due to concurrent ep-&gt;esb_stat modifications.

Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Cc: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: Robert Love &lt;robert.w.love@intel.com&gt;
</content>
</entry>
<entry>
<title>libfc: Fix a race in fc_exch_timer_set_locked()</title>
<updated>2013-09-04T20:16:25Z</updated>
<author>
<name>Bart Van Assche</name>
<email>bvanassche@acm.org</email>
</author>
<published>2013-08-14T15:35:29Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b86788658be425a5454246a954721d9122d2b3d6'/>
<id>urn:sha1:b86788658be425a5454246a954721d9122d2b3d6</id>
<content type='text'>
It is allowed to pass a zero timeout value to fc_seq_exch_abort().
Avoid that this can cause the timeout function to drop the exchange
reference before it has been increased by fc_exch_timer_set_locked().
This patch fixes a crash when running FCoE target code with poisoning
enabled in the memory allocator.

Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Cc: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: Robert Love &lt;robert.w.love@intel.com&gt;
</content>
</entry>
<entry>
<title>libfc: Clarify fc_exch_find()</title>
<updated>2013-09-04T20:09:15Z</updated>
<author>
<name>Bart Van Assche</name>
<email>bvanassche@acm.org</email>
</author>
<published>2013-08-17T20:20:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8d08023687e2515f2a48235aed80b6982025cd09'/>
<id>urn:sha1:8d08023687e2515f2a48235aed80b6982025cd09</id>
<content type='text'>
The condition ep != NULL &amp;&amp; ep-&gt;xid != xid can never be met. Make
this explicit.

Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Cc: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: Robert Love &lt;robert.w.love@intel.com&gt;
</content>
</entry>
<entry>
<title>libfc: Micro-optimize fc_setup_exch_mgr()</title>
<updated>2013-09-04T20:02:09Z</updated>
<author>
<name>Bart Van Assche</name>
<email>bvanassche@acm.org</email>
</author>
<published>2013-08-14T15:33:35Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a84ea8c7e839a73dab4bfc755f7f52e947690dab'/>
<id>urn:sha1:a84ea8c7e839a73dab4bfc755f7f52e947690dab</id>
<content type='text'>
Convert a loop into an ilog2() call. Although this code is not performance
sensitive this conversion makes this code easier to read.

Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Cc: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: Robert Love &lt;robert.w.love@intel.com&gt;
</content>
</entry>
<entry>
<title>libfc: Debug code fixes</title>
<updated>2013-09-04T19:55:02Z</updated>
<author>
<name>Bart Van Assche</name>
<email>bvanassche@acm.org</email>
</author>
<published>2013-08-14T15:32:51Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b20d9bfda77306c2f66a90eb94ef9db58fb1e682'/>
<id>urn:sha1:b20d9bfda77306c2f66a90eb94ef9db58fb1e682</id>
<content type='text'>
The second argument of fc_lport_error() may be a valid frame pointer.
Hence only print it as an error code if it really is an error code.

Debug statements must end in a newline. Add one where it is missing.

Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Cc: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: Robert Love &lt;robert.w.love@intel.com&gt;
</content>
</entry>
<entry>
<title>libfc: Source code comment spelling fixes</title>
<updated>2013-09-04T19:47:49Z</updated>
<author>
<name>Bart Van Assche</name>
<email>bvanassche@acm.org</email>
</author>
<published>2013-08-14T15:31:52Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c1d454246c1339388ed0788f34f88ee12ad58ef3'/>
<id>urn:sha1:c1d454246c1339388ed0788f34f88ee12ad58ef3</id>
<content type='text'>
Change 'initiaive' into 'initiative', 'remainig' into 'remaining'
and change 'exected' into 'expected'.

Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Signed-off-by: Robert Love &lt;robert.w.love@intel.com&gt;
</content>
</entry>
</feed>
