mbox series

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

Message ID 20230515070156.1790181-1-haowenchao2@huawei.com (mailing list archive)
Headers show
Series Fix kernel panic in scsi_queue_rq() | expand

Message

Wenchao Hao May 15, 2023, 7:01 a.m. UTC
'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(-)

Comments

Martin K. Petersen May 17, 2023, 2:13 a.m. UTC | #1
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