(Re-sending email since the previous email was undeliverable due to HTML content)
Hi Team,
This is a request to backport the following fix to 6.5/scsi-fixes. This was merged into Linus' tree.
This fix fixes a crash due to a null pointer exception when a lun reset is issued from sgreset for a lun. With this fix, there is no longer a crash.
I have another fix, which I have tested, dependent on this fix. It is currently in the pipeline. I'll send out a patch for that fix when the internal review is complete.
Please let me know if you need any more information to backport this fix.
commit 15924b0503630016dee4dbb945a8df4df659070b Author: Karan Tilak Kumar kartilak@cisco.com Date: Thu Aug 17 11:21:46 2023 -0700
scsi: fnic: Replace sgreset tag with max_tag_id
sgreset is issued with a SCSI command pointer. The device reset code assumes that it was issued on a hardware queue, and calls block multiqueue layer. However, the assumption is broken, and there is no hardware queue associated with the sgreset, and this leads to a crash due to a null pointer exception.
Fix the code to use the max_tag_id as a tag which does not overlap with the other tags issued by mid layer.
Tested by running FC traffic for a few minutes, and by issuing sgreset on the device in parallel. Without the fix, the crash is observed right away. With this fix, no crash is observed.
Reviewed-by: Sesidhar Baddela sebaddel@cisco.com Tested-by: Karan Tilak Kumar kartilak@cisco.com Signed-off-by: Karan Tilak Kumar kartilak@cisco.com Link: https://lore.kernel.org/r/20230817182146.229059-1-kartilak@cisco.com Signed-off-by: Martin K. Petersen martin.petersen@oracle.com
Thanks, Karan