<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/scsi, branch v5.18.2</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.18.2</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.18.2'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2022-05-20T01:01:02+00:00</updated>
<entry>
<title>scsi: ufs: core: Fix referencing invalid rsp field</title>
<updated>2022-05-20T01:01:02+00:00</updated>
<author>
<name>Daejun Park</name>
<email>daejun7.park@samsung.com</email>
</author>
<published>2022-05-19T06:05:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d5d92b64408443e113b9742f8f1c35278910dd4d'/>
<id>urn:sha1:d5d92b64408443e113b9742f8f1c35278910dd4d</id>
<content type='text'>
Fix referencing sense data when it is invalid. When the length of the data
segment is 0, there is no valid information in the rsp field, so
ufshpb_rsp_upiu() is returned without additional operation.

Link: https://lore.kernel.org/r/252651381.41652940482659.JavaMail.epsvc@epcpadp4
Fixes: 4b5f49079c52 ("scsi: ufs: ufshpb: L2P map management for HPB read")
Acked-by: Avri Altman &lt;avri.altman@wdc.com&gt;
Signed-off-by: Daejun Park &lt;daejun7.park@samsung.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: lpfc: Correct BDE DMA address assignment for GEN_REQ_WQE</title>
<updated>2022-05-11T01:44:04+00:00</updated>
<author>
<name>James Smart</name>
<email>jsmart2021@gmail.com</email>
</author>
<published>2022-05-06T20:55:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7752662071053adcdb6b6e7853834205dd60e1c0'/>
<id>urn:sha1:7752662071053adcdb6b6e7853834205dd60e1c0</id>
<content type='text'>
Garbage FCoE CT frames are transmitted on the wire because of bad DMA ptr
addresses filled in the GEN_REQ_WQE.

The __lpfc_sli_prep_gen_req_s4() routine is using the wrong buffer for the
payload address. Change the DMA buffer assignment from the bmp buffer to
the bpl buffer.

Link: https://lore.kernel.org/r/20220506205548.61644-1-jsmart2021@gmail.com
Fixes: 61910d6a5243 ("scsi: lpfc: SLI path split: Refactor CT paths")
Co-developed-by: Justin Tee &lt;justin.tee@broadcom.com&gt;
Signed-off-by: Justin Tee &lt;justin.tee@broadcom.com&gt;
Signed-off-by: James Smart &lt;jsmart2021@gmail.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: lpfc: Fix split code for FLOGI on FCoE</title>
<updated>2022-05-11T01:43:21+00:00</updated>
<author>
<name>James Smart</name>
<email>jsmart2021@gmail.com</email>
</author>
<published>2022-05-06T20:55:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cc28fac16ab7152168be8bee76708df9d65efd71'/>
<id>urn:sha1:cc28fac16ab7152168be8bee76708df9d65efd71</id>
<content type='text'>
The refactoring code converted context information from SLI-3 to SLI-4.
The conversion for the SLI-4 bit field tried to use the old (hacky) SLI3
high/low bit settings.  Needless to say, it was incorrect.

Explicitly set the context field to type FCFI and set it in the wqe.
SLI-4 is now a proper bit field so no need for the shifting/anding.

Link: https://lore.kernel.org/r/20220506205528.61590-1-jsmart2021@gmail.com
Fixes: 6831ce129f19 ("scsi: lpfc: SLI path split: Refactor base ELS paths and the FLOGI path")
Co-developed-by: Dick Kennedy &lt;dick.kennedy@broadcom.com&gt;
Signed-off-by: Dick Kennedy &lt;dick.kennedy@broadcom.com&gt;
Signed-off-by: James Smart &lt;jsmart2021@gmail.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: qla2xxx: Fix missed DMA unmap for aborted commands</title>
<updated>2022-05-03T00:36:15+00:00</updated>
<author>
<name>Gleb Chesnokov</name>
<email>Chesnokov.G@raidix.com</email>
</author>
<published>2022-04-15T12:42:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=26f9ce53817a8fd84b69a73473a7de852a24c897'/>
<id>urn:sha1:26f9ce53817a8fd84b69a73473a7de852a24c897</id>
<content type='text'>
Aborting commands that have already been sent to the firmware can
cause BUG in qlt_free_cmd(): BUG_ON(cmd-&gt;sg_mapped)

For instance:

 - Command passes rdx_to_xfer state, maps sgl, sends to the firmware

 - Reset occurs, qla2xxx performs ISP error recovery, aborts the command

 - Target stack calls qlt_abort_cmd() and then qlt_free_cmd()

 - BUG_ON(cmd-&gt;sg_mapped) in qlt_free_cmd() occurs because sgl was not
   unmapped

Thus, unmap sgl in qlt_abort_cmd() for commands with the aborted flag set.

Link: https://lore.kernel.org/r/AS8PR10MB4952D545F84B6B1DFD39EC1E9DEE9@AS8PR10MB4952.EURPRD10.PROD.OUTLOOK.COM
Reviewed-by: Himanshu Madhani &lt;himanshu.madhani@oracle.com&gt;
Signed-off-by: Gleb Chesnokov &lt;Chesnokov.G@raidix.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: scsi_dh_alua: Properly handle the ALUA transitioning state</title>
<updated>2022-05-02T23:52:13+00:00</updated>
<author>
<name>Brian Bunker</name>
<email>brian@purestorage.com</email>
</author>
<published>2022-05-02T15:09:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6056a92ceb2a7705d61df7ec5370548e96aee258'/>
<id>urn:sha1:6056a92ceb2a7705d61df7ec5370548e96aee258</id>
<content type='text'>
The handling of the ALUA transitioning state is currently broken. When a
target goes into this state, it is expected that the target is allowed to
stay in this state for the implicit transition timeout without a path
failure. The handler has this logic, but it gets skipped currently.

When the target transitions, there is in-flight I/O from the initiator. The
first of these responses from the target will be a unit attention letting
the initiator know that the ALUA state has changed.  The remaining
in-flight I/Os, before the initiator finds out that the portal state has
changed, will return not ready, ALUA state is transitioning. The portal
state will change to SCSI_ACCESS_STATE_TRANSITIONING. This will lead to all
new I/O immediately failing the path unexpectedly. The path failure happens
in less than a second instead of the expected successes until the
transition timer is exceeded.

Allow I/Os to continue while the path is in the ALUA transitioning
state. The handler already takes care of a target that stays in the
transitioning state for too long by changing the state to ALUA state
standby once the transition timeout is exceeded at which point the path
will fail.

Link: https://lore.kernel.org/r/CAHZQxy+4sTPz9+pY3=7VJH+CLUJsDct81KtnR2be8ycN5mhqTg@mail.gmail.com
Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
Acked-by: Krishna Kant &lt;krishna.kant@purestorage.com&gt;
Acked-by: Seamus Connor &lt;sconnor@purestorage.com&gt;
Signed-off-by: Brian Bunker &lt;brian@purestorage.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: sr: Do not leak information in ioctl</title>
<updated>2022-04-19T02:48:31+00:00</updated>
<author>
<name>Tom Rix</name>
<email>trix@redhat.com</email>
</author>
<published>2022-04-11T17:47:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=faad6cebded8e0fd902b672f220449b93db479eb'/>
<id>urn:sha1:faad6cebded8e0fd902b672f220449b93db479eb</id>
<content type='text'>
sr_ioctl.c uses this pattern:

  result = sr_do_ioctl(cd, &amp;cgc);
  to-user = buffer[];
  kfree(buffer);
  return result;

Use of a buffer without checking leaks information. Check result and jump
over the use of buffer if there is an error.

  result = sr_do_ioctl(cd, &amp;cgc);
  if (result)
    goto err;
  to-user = buffer[];
err:
  kfree(buffer);
  return result;

Additionally, initialize the buffer to zero.

This problem can be seen in the 2.4.0 kernel.

Link: https://lore.kernel.org/r/20220411174756.2418435-1-trix@redhat.com
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Tom Rix &lt;trix@redhat.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: qedi: Fix failed disconnect handling</title>
<updated>2022-04-12T02:09:35+00:00</updated>
<author>
<name>Mike Christie</name>
<email>michael.christie@oracle.com</email>
</author>
<published>2022-04-08T00:13:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=857b06527f707f5df634b854898a191b5c1d0272'/>
<id>urn:sha1:857b06527f707f5df634b854898a191b5c1d0272</id>
<content type='text'>
We set the qedi_ep state to EP_STATE_OFLDCONN_START when the ep is
created. Then in qedi_set_path we kick off the offload work. If userspace
times out the connection and calls ep_disconnect, qedi will only flush the
offload work if the qedi_ep state has transitioned away from
EP_STATE_OFLDCONN_START. If we can't connect we will not have transitioned
state and will leave the offload work running, and we will free the qedi_ep
from under it.

This patch just has us init the work when we create the ep, then always
flush it.

Link: https://lore.kernel.org/r/20220408001314.5014-10-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;
Acked-by: Manish Rangankar &lt;mrangankar@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;
</content>
</entry>
<entry>
<title>scsi: iscsi: Fix NOP handling during conn recovery</title>
<updated>2022-04-12T02:09:35+00:00</updated>
<author>
<name>Mike Christie</name>
<email>michael.christie@oracle.com</email>
</author>
<published>2022-04-08T00:13:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.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:35+00:00</updated>
<author>
<name>Mike Christie</name>
<email>michael.christie@oracle.com</email>
</author>
<published>2022-04-08T00:13:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.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: iscsi: Fix unbound endpoint error handling</title>
<updated>2022-04-12T02:09:35+00:00</updated>
<author>
<name>Mike Christie</name>
<email>michael.christie@oracle.com</email>
</author>
<published>2022-04-08T00:13:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=03690d81974535f228e892a14f0d2d44404fe555'/>
<id>urn:sha1:03690d81974535f228e892a14f0d2d44404fe555</id>
<content type='text'>
If a driver raises a connection error before the connection is bound, we
can leave a cleanup_work queued that can later run and disconnect/stop a
connection that is logged in. The problem is that drivers can call
iscsi_conn_error_event for endpoints that are connected but not yet bound
when something like the network port they are using is brought down.
iscsi_cleanup_conn_work_fn will check for this and exit early, but if the
cleanup_work is stuck behind other works, it might not get run until after
userspace has done ep_disconnect. Because the endpoint is not yet bound
there was no way for ep_disconnect to flush the work.

The bug of leaving stop_conns queued was added in:

Commit 23d6fefbb3f6 ("scsi: iscsi: Fix in-kernel conn failure handling")

and:

Commit 0ab710458da1 ("scsi: iscsi: Perform connection failure entirely in
kernel space")

was supposed to fix it, but left this case.

This patch moves the conn state check to before we even queue the work so
we can avoid queueing.

Link: https://lore.kernel.org/r/20220408001314.5014-7-michael.christie@oracle.com
Fixes: 0ab710458da1 ("scsi: iscsi: Perform connection failure entirely in kernel space")
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>
</feed>
