[PATCH 0/2] Fix kernel panic in scsi_queue_rq()

Wenchao Hao posted 2 patches 2 years, 8 months ago
drivers/scsi/scsi_lib.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
[PATCH 0/2] Fix kernel panic in scsi_queue_rq()
Posted by Wenchao Hao 2 years, 8 months ago
'cfee29ffb45b ("scsi: core: Do not increase scsi_device's iorequest_cnt
if dispatch failed")' introduce bug which would cause kernel panic.

So revert the changes and fix the origin issue by decreasing the
iorequest_cnt if scsi_dispatch_cmd return failed.

Wenchao Hao (2):
  Revert "scsi: core: Do not increase scsi_device's iorequest_cnt if
    dispatch failed"
  scsi: core: decrease scsi_device's iorequest_cnt if dispatch failed

 drivers/scsi/scsi_lib.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

-- 
2.32.0
Re: [PATCH 0/2] Fix kernel panic in scsi_queue_rq()
Posted by Martin K. Petersen 2 years, 8 months ago
On Mon, 15 May 2023 15:01:54 +0800, Wenchao Hao wrote:

> 'cfee29ffb45b ("scsi: core: Do not increase scsi_device's iorequest_cnt
> if dispatch failed")' introduce bug which would cause kernel panic.
> 
> So revert the changes and fix the origin issue by decreasing the
> iorequest_cnt if scsi_dispatch_cmd return failed.
> 
> Wenchao Hao (2):
>   Revert "scsi: core: Do not increase scsi_device's iorequest_cnt if
>     dispatch failed"
>   scsi: core: decrease scsi_device's iorequest_cnt if dispatch failed
> 
> [...]

Applied to 6.4/scsi-fixes, thanks!

[1/2] Revert "scsi: core: Do not increase scsi_device's iorequest_cnt if dispatch failed"
      https://git.kernel.org/mkp/scsi/c/6ca9818d1624
[2/2] scsi: core: decrease scsi_device's iorequest_cnt if dispatch failed
      https://git.kernel.org/mkp/scsi/c/09e797c8641f

-- 
Martin K. Petersen	Oracle Linux Engineering