<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/target, branch v3.1.10</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.1.10</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.1.10'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2011-12-21T20:58:30Z</updated>
<entry>
<title>target/file: walk properly over sg list</title>
<updated>2011-12-21T20:58:30Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2011-11-28T11:33:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=31922adf08bd43e543eebb83adb856a489986aa6'/>
<id>urn:sha1:31922adf08bd43e543eebb83adb856a489986aa6</id>
<content type='text'>
commit 9649fa1b8764f64c8cc4293e197e14cd46fe7205 upstream.

This patch changes fileio to use for_each_sg() when walking se_task-&gt;task_sg
memory passed into from loopback LLD struct scsi_cmnd scatterlist memory.

This addresses an issue where FILEIO backends with loopback where hitting the
following OOPs with mkfs.ext2:

|kernel BUG at include/linux/scatterlist.h:97!
|invalid opcode: 0000 [#1] PREEMPT SMP
|Modules linked in: sd_mod tcm_loop target_core_stgt scsi_tgt target_core_pscsi target_core_file target_core_iblock target_core_mod configfs scsi_mod
|
|Pid: 671, comm: LIO_fileio Not tainted 3.1.0-rc10+ #139 Bochs Bochs
|EIP: 0060:[&lt;e0afd746&gt;] EFLAGS: 00010202 CPU: 0
|EIP is at fd_do_task+0x396/0x420 [target_core_file]
| [&lt;e0aa7884&gt;] __transport_execute_tasks+0xd4/0x190 [target_core_mod]
| [&lt;e0aa797c&gt;] transport_execute_tasks+0x3c/0xf0 [target_core_mod]
|EIP: [&lt;e0afd746&gt;] fd_do_task+0x396/0x420 [target_core_file] SS:ESP 0068:dea47e90

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.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@suse.de&gt;

</content>
</entry>
<entry>
<title>iscsi-target: Add missing F_BIT for iscsi_tm_rsp</title>
<updated>2011-12-21T20:58:30Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2011-11-28T06:25:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=32d7d1813d394c2e74b444cc4226ece55a26739a'/>
<id>urn:sha1:32d7d1813d394c2e74b444cc4226ece55a26739a</id>
<content type='text'>
commit 7ae0b1038f9f7d4c91e9afd4dbbc98210bf1a241 upstream.

This patch sets the missing ISCSI_FLAG_CMD_FINAL bit in
iscsit_send_task_mgt_rsp() for a struct iscsi_tm_rsp PDU.

This usage is hardcoded for all TM response PDUs in RFC-3720
section 10.6.

Reported-by: whucecil &lt;whucecil1999@gmail.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>target: Fix page length in emulated INQUIRY VPD page 86h</title>
<updated>2011-12-21T20:58:30Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2011-11-22T21:51:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2b16ab8d498d84a33a7f827184beb3c9fbc7da9f'/>
<id>urn:sha1:2b16ab8d498d84a33a7f827184beb3c9fbc7da9f</id>
<content type='text'>
commit 1289a0571c037b4757f60597d646aedb70361ec3 upstream.

The LSB of the page length is at offset 3, not 2.

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@suse.de&gt;

</content>
</entry>
<entry>
<title>target: Handle 0 correctly in transport_get_sectors_6()</title>
<updated>2011-12-21T20:58:29Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2011-11-22T21:51:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6764359b3a2840ea27cf09d1c4306598af8767bd'/>
<id>urn:sha1:6764359b3a2840ea27cf09d1c4306598af8767bd</id>
<content type='text'>
commit 9b5cd7f37e1e018432111333e2a67f78ba41edfe upstream.

SBC-3 says:

    A TRANSFER LENGTH field set to zero specifies that 256 logical
    blocks shall be written.  Any other value specifies the number
    of logical blocks that shall be written.

The old code was always just returning the value in the TRANSFER LENGTH
byte.  Fix this to return 256 if the byte is 0.

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@suse.de&gt;

</content>
</entry>
<entry>
<title>iscsi-target: Fix residual count hanlding + remove iscsi_cmd-&gt;residual_count</title>
<updated>2011-12-21T20:58:29Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2011-11-16T07:59:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=43dd6e6faffcacc6d8d9d12f15d6aa5f2f4fa351'/>
<id>urn:sha1:43dd6e6faffcacc6d8d9d12f15d6aa5f2f4fa351</id>
<content type='text'>
commit 7e46cf02687e40197ae07c623e660be2a2720064 upstream.

This patch fixes iscsi-target handling of underflow where residual data is
causing an OOPs by using the incorrect iscsi_cmd_t-&gt;data_length initially
assigned in iscsit_allocate_se_cmd().  It resets iscsi_cmd_t-&gt;data_length
from se_cmd_t-&gt;data_length after transport_generic_allocate_tasks()
has been invoked in iscsit_handle_scsi_cmd() RX context, and converts
iscsi_cmd-&gt;residual_count usage to access iscsi_cmd-&gt;se_cmd.residual_count
to get the proper residual count set by target-core.

Reported-by: &lt;lists@internyc.net&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>target: Reject SCSI data overflow for fabrics using transport_generic_map_mem_to_cmd</title>
<updated>2011-12-21T20:58:28Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2011-11-16T06:13:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1c9c1ada7ee0b4b42e451d35153dff3735b28cac'/>
<id>urn:sha1:1c9c1ada7ee0b4b42e451d35153dff3735b28cac</id>
<content type='text'>
commit fef58a6096770ed6ab49103a430cc755254a74d9 upstream.

This patch changes transport_generic_map_mem_to_cmd() to reject SCSI data
overflow and to send exception status with CHECK_CONDITION + TCM_INVALID_CDB_FIELD
for fabrics that are passing a pre-populated struct scatterlist (eg: tcm_loop
and iscsi-target) being mapped into se_cmd-&gt;t_data_sg and se_cmd-&gt;t_data_nents.

This addresses an OOPs where transport_allocate_data_tasks() would walk
the incorrect post OVERFLOW cmd-&gt;data_length value beyond the end of
the passed scatterlist.

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

</content>
</entry>
<entry>
<title>target: Fix wrong se_tmr being added to drain_tmr_list</title>
<updated>2011-11-11T17:44:38Z</updated>
<author>
<name>Joern Engel</name>
<email>joern@logfs.org</email>
</author>
<published>2011-10-26T20:37:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8981e86717bf2d682bf08db846d7daafd9fb6a45'/>
<id>urn:sha1:8981e86717bf2d682bf08db846d7daafd9fb6a45</id>
<content type='text'>
commit 6eb40b2af4908e9aee71e43e7a384243128c56dd upstream.

This patch fixes another bug from LUN_RESET re-org fallout in
core_tmr_drain_tmr_list() that was adding the wrong se_tmr_req
into the local drain_tmr_list to be walked + released.

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Cc: Joern Engel &lt;joern@logfs.org&gt;
Reviewed-by: Roland Dreier &lt;roland@purestorage.com&gt;
Cc: 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@suse.de&gt;

</content>
</entry>
<entry>
<title>target: Fix incorrect se_cmd assignment in core_tmr_drain_tmr_list</title>
<updated>2011-11-11T17:44:38Z</updated>
<author>
<name>Joern Engel</name>
<email>joern@logfs.org</email>
</author>
<published>2011-10-26T05:08:43Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a1dc5b0de6f3083000c3b990dc319dd842ad7420'/>
<id>urn:sha1:a1dc5b0de6f3083000c3b990dc319dd842ad7420</id>
<content type='text'>
commit 80ccbc8e00f7001d79dd503c2781487906b98611 upstream.

This patch fixes a bug in core_tmr_drain_tmr_list() where drain_tmr_list
was using the wrong se_tmr_req for cmd assignment due to a typo during the
LUN_RESET re-org.  This was resulting in general protection faults while
using the leftover bogus *tmr_p pointer from list_for_each_entry_safe().

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Cc: Joern Engel &lt;joern@logfs.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>iscsi-target: Fix non-immediate TMR handling</title>
<updated>2011-11-11T17:44:19Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2011-10-28T20:37:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=622dadf0a4cb5bcf648363121733031b2b2eb93a'/>
<id>urn:sha1:622dadf0a4cb5bcf648363121733031b2b2eb93a</id>
<content type='text'>
commit 5a4c8666c6d576f076a7c6824589cdbb984c0f84 upstream.

This patch addresses two issues with non immediate TMR handling in
iscsit_handle_task_mgt_cmd().  The first involves breakage due to
v3.1-rc conversion of iscsit_sequence_cmd(), which upon good status
would hit the iscsit_add_reject_from_cmd() block of code.  This patch
adds an explict check for CMDSN_ERROR_CANNOT_RECOVER.

The second adds a check to return when non immediate TMR operation is
detected after iscsit_ack_from_expstatsn(), as iscsit_sequence_cmd()
-&gt; iscsit_execute_cmd() will have called transport_generic_handle_tmr()
for the non immediate TMR case already.

Cc: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>iscsi-target: Add missing CMDSN_LOWER_THAN_EXP check in iscsit_handle_scsi_cmd</title>
<updated>2011-11-11T17:44:18Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2011-10-28T20:32:35Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ebe1d9e9db0783fc3c74f239db7833dff28d1218'/>
<id>urn:sha1:ebe1d9e9db0783fc3c74f239db7833dff28d1218</id>
<content type='text'>
commit 7e32da55e26b80d57961681e53aa67938268db3f upstream.

This patch adds a missing CMDSN_LOWER_THAN_EXP return check for
iscsit_sequence_cmd() in iscsit_handle_scsi_cmd() that was incorrectly
dropped during the v3.1-rc cleanups to use iscsit_sequence_cmd().

Cc: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
</feed>
