<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/scsi/libiscsi.c, branch linux-5.19.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.19.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.19.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-10-24T07:57:58Z</updated>
<entry>
<title>scsi: iscsi: Add recv workqueue helpers</title>
<updated>2022-10-24T07:57:58Z</updated>
<author>
<name>Mike Christie</name>
</author>
<published>2022-06-16T22:45:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bd16ec67e9959b749cc228baea06f670381c2ebb'/>
<id>urn:sha1:bd16ec67e9959b749cc228baea06f670381c2ebb</id>
<content type='text'>
[ Upstream commit 8af809966c0b34cfacd8da9a412689b8e9910354 ]

Add helpers to allow the drivers to run their recv paths from libiscsi's
workqueue.

Link: https://lore.kernel.org/r/20220616224557.115234-3-michael.christie@oracle.com
Reviewed-by: Lee Duncan &lt;lduncan@suse.com&gt;
Signed-off-by: Mike Christie &lt;michael.christie@oracle.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Stable-dep-of: 57569c37f0ad ("scsi: iscsi: iscsi_tcp: Fix null-ptr-deref while calling getpeername()")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>scsi: iscsi: Rename iscsi_conn_queue_work()</title>
<updated>2022-10-24T07:57:57Z</updated>
<author>
<name>Mike Christie</name>
</author>
<published>2022-06-16T22:45:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=38a118abf5ccafd54ad4f24556ee3ff1b0351a21'/>
<id>urn:sha1:38a118abf5ccafd54ad4f24556ee3ff1b0351a21</id>
<content type='text'>
[ Upstream commit 4b9f8ce4d5e823e42944c5a0a4842b0f936365ad ]

Rename iscsi_conn_queue_work() to iscsi_conn_queue_xmit() to reflect that
it handles queueing of xmits only.

Link: https://lore.kernel.org/r/20220616224557.115234-2-michael.christie@oracle.com
Reviewed-by: Lee Duncan &lt;lduncan@suse.com&gt;
Reviewed-by: Wu Bo &lt;wubo40@huawei.com&gt;
Signed-off-by: Mike Christie &lt;michael.christie@oracle.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Stable-dep-of: 57569c37f0ad ("scsi: iscsi: iscsi_tcp: Fix null-ptr-deref while calling getpeername()")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>scsi: iscsi: Fix session removal on shutdown</title>
<updated>2022-08-17T13:15:22Z</updated>
<author>
<name>Mike Christie</name>
</author>
<published>2022-06-16T22:27:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=984be156c3b51f0da8598dba4926ee0e027ee268'/>
<id>urn:sha1:984be156c3b51f0da8598dba4926ee0e027ee268</id>
<content type='text'>
[ Upstream commit 31500e902759322ba3c64b60dabae2704e738df8 ]

When the system is shutting down, iscsid is not running so we will not get
a response to the ISCSI_ERR_INVALID_HOST error event. The system shutdown
will then hang waiting on userspace to remove the session.

This has libiscsi force the destruction of the session from the kernel when
iscsi_host_remove() is called from a driver's shutdown callout.

This fixes a regression added in qedi boot with commit d1f2ce77638d ("scsi:
qedi: Fix host removal with running sessions") which made qedi use the
common session removal function that waits on userspace instead of rolling
its own kernel based removal.

Link: https://lore.kernel.org/r/20220616222738.5722-7-michael.christie@oracle.com
Fixes: d1f2ce77638d ("scsi: qedi: Fix host removal with running sessions")
Tested-by: Nilesh Javali &lt;njavali@marvell.com&gt;
Reviewed-by: Lee Duncan &lt;lduncan@suse.com&gt;
Reviewed-by: Nilesh Javali &lt;njavali@marvell.com&gt;
Signed-off-by: Mike Christie &lt;michael.christie@oracle.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>scsi: iscsi: Fix NOP handling during conn recovery</title>
<updated>2022-04-12T02:09:35Z</updated>
<author>
<name>Mike Christie</name>
</author>
<published>2022-04-08T00:13:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=44ac97109e42f87b1a34954704b81b6c8eca80c4'/>
<id>urn:sha1:44ac97109e42f87b1a34954704b81b6c8eca80c4</id>
<content type='text'>
If a offload driver doesn't use the xmit workqueue, then when we are doing
ep_disconnect libiscsi can still inject PDUs to the driver. This adds a
check for if the connection is bound before trying to inject PDUs.

Link: https://lore.kernel.org/r/20220408001314.5014-9-michael.christie@oracle.com
Tested-by: Manish Rangankar &lt;mrangankar@marvell.com&gt;
Reviewed-by: Lee Duncan &lt;lduncan@suse.com&gt;
Reviewed-by: Chris Leech &lt;cleech@redhat.com&gt;
Signed-off-by: Mike Christie &lt;michael.christie@oracle.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: iscsi: Merge suspend fields</title>
<updated>2022-04-12T02:09:35Z</updated>
<author>
<name>Mike Christie</name>
</author>
<published>2022-04-08T00:13:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5bd856256f8c03e329f8ff36d8c8efcb111fe6df'/>
<id>urn:sha1:5bd856256f8c03e329f8ff36d8c8efcb111fe6df</id>
<content type='text'>
Move the tx and rx suspend fields into one flags field.

Link: https://lore.kernel.org/r/20220408001314.5014-8-michael.christie@oracle.com
Tested-by: Manish Rangankar &lt;mrangankar@marvell.com&gt;
Reviewed-by: Lee Duncan &lt;lduncan@suse.com&gt;
Reviewed-by: Chris Leech &lt;cleech@redhat.com&gt;
Signed-off-by: Mike Christie &lt;michael.christie@oracle.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: libiscsi: Remove unnecessary memset() in iscsi_conn_setup()</title>
<updated>2022-03-30T03:01:28Z</updated>
<author>
<name>Wenchao Hao</name>
</author>
<published>2022-03-17T15:01:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ebfe3e0c5e805da3dd692bb120cd6269b7c19b80'/>
<id>urn:sha1:ebfe3e0c5e805da3dd692bb120cd6269b7c19b80</id>
<content type='text'>
iscsi_cls_conn is alloced by kzalloc(), the whole iscsi_cls_conn is zero
filled already including the dd_data. So it is unnecessary to call memset
again.

Link: https://lore.kernel.org/r/20220317150116.194140-1-haowenchao@huawei.com
Reviewed-by: Wu Bo &lt;wubo40@huawei.com&gt;
Reviewed-by: Lee Duncan &lt;lduncan@suse.com&gt;
Reviewed-by: Mike Christie &lt;michael.christie@oracle.com&gt;
Signed-off-by: Wenchao Hao &lt;haowenchao@huawei.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: libiscsi: Teardown iscsi_cls_conn gracefully</title>
<updated>2022-03-15T04:20:16Z</updated>
<author>
<name>Wenchao Hao</name>
</author>
<published>2022-03-10T01:57:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8709c323091be019f76a49cf783052a5636aca85'/>
<id>urn:sha1:8709c323091be019f76a49cf783052a5636aca85</id>
<content type='text'>
Commit 1b8d0300a3e9 ("scsi: libiscsi: Fix UAF in
iscsi_conn_get_param()/iscsi_conn_teardown()") fixed an UAF in
iscsi_conn_get_param() and introduced 2 tmp_xxx varibles.

We can gracefully fix this UAF with the help of device_del(). Calling
iscsi_remove_conn() at the beginning of iscsi_conn_teardown would make
userspace unable to see iscsi_cls_conn. This way we we can free memory
safely.

Remove iscsi_destroy_conn() since it is no longer used.

Link: https://lore.kernel.org/r/20220310015759.3296841-4-haowenchao@huawei.com
Reviewed-by: Mike Christie &lt;michael.christie@oracle.com&gt;
Signed-off-by: Wenchao Hao &lt;haowenchao@huawei.com&gt;
Signed-off-by: Wu Bo &lt;wubo40@huawei.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: libiscsi: Add iscsi_cls_conn to sysfs after initialization</title>
<updated>2022-03-15T04:19:50Z</updated>
<author>
<name>Wenchao Hao</name>
</author>
<published>2022-03-10T01:57:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7dae459f5e56a89ab01413ae055595c982713349'/>
<id>urn:sha1:7dae459f5e56a89ab01413ae055595c982713349</id>
<content type='text'>
iscsi_create_conn() exposed iscsi_cls_conn to sysfs prior to initialization
of iscsi_conn's dd_data. When userspace tried to access an attribute such
as the connect address, a NULL pointer dereference was observed.

Do not add iscsi_cls_conn to sysfs until it has been initialized.  Remove
iscsi_create_conn() since it is no longer used.

Link: https://lore.kernel.org/r/20220310015759.3296841-3-haowenchao@huawei.com
Reviewed-by: Mike Christie &lt;michael.christie@oracle.com&gt;
Signed-off-by: Wenchao Hao &lt;haowenchao@huawei.com&gt;
Signed-off-by: Wu Bo &lt;wubo40@huawei.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: iscsi: Drop temp workq_name</title>
<updated>2022-03-02T04:56:28Z</updated>
<author>
<name>Mike Christie</name>
</author>
<published>2022-02-26T23:04:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=69af1c9577aae2149f79be6f485609250fdfb0ad'/>
<id>urn:sha1:69af1c9577aae2149f79be6f485609250fdfb0ad</id>
<content type='text'>
When the workqueue code was created it didn't allow variable args so we
have been using a temp buffer. Drop that.

Link: https://lore.kernel.org/r/20220226230435.38733-7-michael.christie@oracle.com
Reviewed-by: Chris Leech &lt;cleech@redhat.com&gt;
Reviewed-by: Lee Duncan &lt;lduncan@suse.com&gt;
Signed-off-by: Mike Christie &lt;michael.christie@oracle.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: iscsi: Stop using the SCSI pointer</title>
<updated>2022-02-23T02:11:04Z</updated>
<author>
<name>Bart Van Assche</name>
</author>
<published>2022-02-18T19:50:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=db22de3eb0352d2f8e7cda08f3fa65690e3fd64d'/>
<id>urn:sha1:db22de3eb0352d2f8e7cda08f3fa65690e3fd64d</id>
<content type='text'>
Instead of storing the iSCSI task pointer and the session age in the SCSI
pointer, use command-private variables. This patch prepares for removal of
the SCSI pointer from struct scsi_cmnd.

The list of iSCSI drivers has been obtained as follows:
$ git grep -lw iscsi_host_alloc
drivers/infiniband/ulp/iser/iscsi_iser.c
drivers/scsi/be2iscsi/be_main.c
drivers/scsi/bnx2i/bnx2i_iscsi.c
drivers/scsi/cxgbi/libcxgbi.c
drivers/scsi/iscsi_tcp.c
drivers/scsi/libiscsi.c
drivers/scsi/qedi/qedi_main.c
drivers/scsi/qla4xxx/ql4_os.c
include/scsi/libiscsi.h

Note: it is not clear to me how the qla4xxx driver can work without this
patch since it uses the scsi_cmnd::SCp.ptr member for two different
purposes:
- The qla4xxx driver uses this member to store a struct srb pointer.
- libiscsi uses this member to store a struct iscsi_task pointer.

Reviewed-by: Lee Duncan &lt;lduncan@suse.com&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
Reviewed-by: Himanshu Madhani &lt;himanshu.madhani@oracle.com&gt;
Cc: Chris Leech &lt;cleech@redhat.com&gt;
Cc: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Cc: Nilesh Javali &lt;njavali@marvell.com&gt;
Cc: Manish Rangankar &lt;mrangankar@marvell.com&gt;
Cc: Karen Xie &lt;kxie@chelsio.com&gt;
Cc: Ketan Mukadam &lt;ketan.mukadam@broadcom.com&gt;
Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;

iscsi

Link: https://lore.kernel.org/r/20220218195117.25689-26-bvanassche@acm.org
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
</feed>
