<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/target, branch v3.9.7</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.9.7</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.9.7'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2013-06-07T19:53:36Z</updated>
<entry>
<title>target/file: Fix off-by-one READ_CAPACITY bug for !S_ISBLK export</title>
<updated>2013-06-07T19:53:36Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2013-05-30T04:35:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0813b7c39d5d046feb9e7a632abd09aaafae056e'/>
<id>urn:sha1:0813b7c39d5d046feb9e7a632abd09aaafae056e</id>
<content type='text'>
commit 21363ca873334391992f2f424856aa864345bb61 upstream.

This patch fixes a bug where FILEIO was incorrectly reporting the number
of logical blocks (+ 1) when using non struct block_device export mode.

It changes fd_get_blocks() to follow all other backend -&gt;get_blocks() cases,
and reduces the calculated dev_size by one dev-&gt;dev_attrib.block_size
number of bytes, and also fixes initial fd_block_size assignment at
fd_configure_device() time introduced in commit 0fd97ccf4.

Reported-by: Wenchao Xia &lt;xiawenc@linux.vnet.ibm.com&gt;
Reported-by: Badari Pulavarty &lt;pbadari@us.ibm.com&gt;
Tested-by: Badari Pulavarty &lt;pbadari@us.ibm.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Lingzhu Xiang &lt;lxiang@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>target: Re-instate sess_wait_list for target_wait_for_sess_cmds</title>
<updated>2013-06-07T19:53:35Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2013-05-15T07:52:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=befb0ab8d1a9f51fb1682aaec9f0ab0eb23228e8'/>
<id>urn:sha1:befb0ab8d1a9f51fb1682aaec9f0ab0eb23228e8</id>
<content type='text'>
commit 9b31a328e344e62e7cc98ae574edcb7b674719bb upstream.

Switch back to pre commit 1c7b13fe652 list splicing logic for active I/O
shutdown with tcm_qla2xxx + ib_srpt fabrics.

The original commit was done under the incorrect assumption that it's safe to
walk se_sess-&gt;sess_cmd_list unprotected in target_wait_for_sess_cmds() after
sess-&gt;sess_tearing_down = 1 has been set by target_sess_cmd_list_set_waiting()
during session shutdown.

So instead of adding sess-&gt;sess_cmd_lock protection around sess-&gt;sess_cmd_list
during target_wait_for_sess_cmds(), switch back to sess-&gt;sess_wait_list to
allow wait_for_completion() + TFO-&gt;release_cmd() to occur without having to
walk -&gt;sess_cmd_list after the list_splice.

Also add a check to exit if target_sess_cmd_list_set_waiting() has already
been called, and add a WARN_ON to check for any fabric bug where new se_cmds
are added to sess-&gt;sess_cmd_list after sess-&gt;sess_tearing_down = 1 has already
been set.

Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Cc: Joern Engel &lt;joern@logfs.org&gt;
Cc: Roland Dreier &lt;roland@kernel.org&gt;
Signed-off-by: Lingzhu Xiang &lt;lxiang@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>iscsi-target: fix heap buffer overflow on error</title>
<updated>2013-06-07T19:53:20Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2013-05-23T17:32:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a6ff6ba26bd680f6c2afe0e599ffde19f9c41cb2'/>
<id>urn:sha1:a6ff6ba26bd680f6c2afe0e599ffde19f9c41cb2</id>
<content type='text'>
commit cea4dcfdad926a27a18e188720efe0f2c9403456 upstream.

If a key was larger than 64 bytes, as checked by iscsi_check_key(), the
error response packet, generated by iscsi_add_notunderstood_response(),
would still attempt to copy the entire key into the packet, overflowing
the structure on the heap.

Remote preauthentication kernel memory corruption was possible if a
target was configured and listening on the network.

CVE-2013-2850

Signed-off-by: Kees Cook &lt;keescook@chromium.org&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: Use FD_MAX_SECTORS/FD_BLOCKSIZE for blockdevs using fileio</title>
<updated>2013-05-19T18:38:47Z</updated>
<author>
<name>Andy Grover</name>
<email>agrover@redhat.com</email>
</author>
<published>2013-04-26T18:09:03Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8cb3a88522df20a6d77934260040facfc0449f0e'/>
<id>urn:sha1:8cb3a88522df20a6d77934260040facfc0449f0e</id>
<content type='text'>
commit e3e84cda321703b123f36488f50700f371bc7230 upstream.

We can still see the error reported in

https://patchwork.kernel.org/patch/2338981/

when using fileio backed by a block device.

I'm assuming this will get us past that error (from sbc_parse_cdb),
and also assuming it's OK to have our max_sectors be larger than
the block's queue max hw sectors?

Reported-by: Eric Harney &lt;eharney@redhat.com&gt;
Signed-off-by: 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@linuxfoundation.org&gt;


</content>
</entry>
<entry>
<title>target/iblock: Fix WCE=1 + DPOFUA=1 backend WRITE regression</title>
<updated>2013-05-19T18:38:43Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2013-05-15T06:41:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1ed59c216723ca3586509ff309fbb987312d922a'/>
<id>urn:sha1:1ed59c216723ca3586509ff309fbb987312d922a</id>
<content type='text'>
commit d2bdbee0d91a5d3ba2e439ce889e20bfe6fd4f1b upstream.

This patch fixes a regression bug introduced in v3.9-rc1 where if the
underlying struct block_device for a IBLOCK backend is configured with
WCE=1 + DPOFUA=1 settings, the rw = WRITE assignment no longer occurs
in iblock_execute_rw(), and rw = 0 is passed to iblock_submit_bios()
in effect causing a READ bio operation to occur.

The offending commit is:

commit d0c8b259f8970d39354c1966853363345d401330
Author: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Date:   Tue Jan 29 22:10:06 2013 -0800

    target/iblock: Use backend REQ_FLUSH hint for WriteCacheEnabled status

Note the WCE=1 + DPOFUA=0, WCE=0 + DPOFUA=1, and WCE=0 + DPOFUA=0 cases
are not affected by this regression bug.

Reported-by: Chris Boot &lt;bootc@bootc.net&gt;
Tested-by: Chris Boot &lt;bootc@bootc.net&gt;
Reported-by: Hannes Reinecke &lt;hare@suse.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: close target_put_sess_cmd() vs. core_tmr_abort_task() race</title>
<updated>2013-05-19T18:38:43Z</updated>
<author>
<name>Joern Engel</name>
<email>joern@logfs.org</email>
</author>
<published>2013-05-13T20:30:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=114b8afe93aa6bf9ffd97874643e7f8485865012'/>
<id>urn:sha1:114b8afe93aa6bf9ffd97874643e7f8485865012</id>
<content type='text'>
commit ccf5ae83a6cf3d9cfe9a7038bfe7cd38ab03d5e1 upstream.

It is possible for one thread to to take se_sess-&gt;sess_cmd_lock in
core_tmr_abort_task() before taking a reference count on
se_cmd-&gt;cmd_kref, while another thread in target_put_sess_cmd() drops
se_cmd-&gt;cmd_kref before taking se_sess-&gt;sess_cmd_lock.

This introduces kref_put_spinlock_irqsave() and uses it in
target_put_sess_cmd() to close the race window.

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&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 processing of OOO commands</title>
<updated>2013-05-19T18:38:43Z</updated>
<author>
<name>Shlomo Pongratz</name>
<email>shlomop@mellanox.com</email>
</author>
<published>2013-05-05T14:36:26Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c597f2a40780026e4574e02e05296e22ad84c58f'/>
<id>urn:sha1:c597f2a40780026e4574e02e05296e22ad84c58f</id>
<content type='text'>
commit 3eccfdb01da58fbd0f789ae6ca61cee3769e26de upstream.

Fix two issues in OOO commands processing done at iscsit_attach_ooo_cmdsn.

Handle command serial numbers wrap around by using iscsi_sna_lt and not regular comparisson.

The routine iterates until it finds an entry whose serial number is greater than the serial number of
the new one, thus the new entry should be inserted before that entry and not after.

Signed-off-by: Shlomo Pongratz &lt;shlomop@mellanox.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 incorrect fallthrough of ALUA Standby/Offline/Transition CDBs</title>
<updated>2013-04-11T08:48:49Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2013-04-10T22:00:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=30f359a6f9da65a66de8cadf959f0f4a0d498bba'/>
<id>urn:sha1:30f359a6f9da65a66de8cadf959f0f4a0d498bba</id>
<content type='text'>
This patch fixes a bug where a handful of informational / control CDBs
that should be allowed during ALUA access state Standby/Offline/Transition
where incorrectly returning CHECK_CONDITION + ASCQ_04H_ALUA_TG_PT_*.

This includes INQUIRY + REPORT_LUNS, which would end up preventing LUN
registration when LUN scanning occured during these ALUA access states.

Cc: Hannes Reinecke &lt;hare@suse.de&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Fix RESERVATION_CONFLICT status regression for iscsi-target special case</title>
<updated>2013-03-29T06:42:47Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2013-03-29T06:06:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f85eda8d75d37a3796cee7f5a906e50e3f13d9e1'/>
<id>urn:sha1:f85eda8d75d37a3796cee7f5a906e50e3f13d9e1</id>
<content type='text'>
This patch fixes a regression introduced in v3.8-rc1 code where a failed
target_check_reservation() check in target_setup_cmd_from_cdb() was causing
an incorrect SAM_STAT_GOOD status to be returned during a WRITE operation
performed by an unregistered / unreserved iscsi initiator port.

This regression is only effecting iscsi-target due to a special case check
for TCM_RESERVATION_CONFLICT within iscsi_target_erl1.c:iscsit_execute_cmd(),
and was still correctly disallowing WRITE commands from backend submission
for unregistered / unreserved initiator ports, while returning the incorrect
SAM_STAT_GOOD status due to the missing SAM_STAT_RESERVATION_CONFLICT
assignment.

This regression was first introduced with:

commit de103c93aff0bed0ae984274e5dc8b95899badab
Author: Christoph Hellwig &lt;hch@lst.de&gt;
Date:   Tue Nov 6 12:24:09 2012 -0800

    target: pass sense_reason as a return value

Go ahead and re-add the missing SAM_STAT_RESERVATION_CONFLICT assignment
during a target_check_reservation() failure, so that iscsi-target code
sends the correct SCSI status.

All other fabrics using target_submit_cmd_*() with a RESERVATION_CONFLICT
call to transport_generic_request_failure() are not effected by this bug.

Reported-by: Jeff Leung &lt;jleung@curriegrad2004.ca&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target/pscsi: Reject cross page boundary case in pscsi_map_sg</title>
<updated>2013-03-20T00:31:14Z</updated>
<author>
<name>Asias He</name>
<email>asias@redhat.com</email>
</author>
<published>2013-03-19T04:55:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8f27d487bcc2bd603c2d87e1729abcbc301f15db'/>
<id>urn:sha1:8f27d487bcc2bd603c2d87e1729abcbc301f15db</id>
<content type='text'>
We can only have one page of data in each sg element, so we can not
cross a page boundary. Fail this case.

The 'while (len &gt; 0 &amp;&amp; data_len &gt; 0) {}' loop is not necessary. The loop
can only be executed once.

Signed-off-by: Asias He &lt;asias@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
</feed>
