WSL2-Linux-Kernel/drivers/infiniband/ulp
Bart Van Assche b9bdffb3f9 RDMA/srp: Do not call scsi_done() from srp_abort()
[ Upstream commit e193b7955d ]

After scmd_eh_abort_handler() has called the SCSI LLD eh_abort_handler
callback, it performs one of the following actions:
* Call scsi_queue_insert().
* Call scsi_finish_command().
* Call scsi_eh_scmd_add().
Hence, SCSI abort handlers must not call scsi_done(). Otherwise all
the above actions would trigger a use-after-free. Hence remove the
scsi_done() call from srp_abort(). Keep the srp_free_req() call
before returning SUCCESS because we may not see the command again if
SUCCESS is returned.

Cc: Bob Pearson <rpearsonhpe@gmail.com>
Cc: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Fixes: d853667091 ("IB/srp: Avoid having aborted requests hang")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20230823205727.505681-1-bvanassche@acm.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-10-19 23:05:32 +02:00
..
ipoib IB/IPoIB: Fix legacy IPoIB due to wrong number of queues 2023-02-14 19:17:58 +01:00
iser scsi: iscsi: Fix session removal on shutdown 2022-08-17 14:23:45 +02:00
isert Revert "IB/isert: Fix incorrect release of isert connection" 2023-09-19 12:22:48 +02:00
opa_vnic RDMA: Convert comma to semicolon 2021-01-07 13:53:41 -04:00
rtrs RDMA/rtrs: Fix rxe_dealloc_pd warning 2023-06-21 15:59:16 +02:00
srp RDMA/srp: Do not call scsi_done() from srp_abort() 2023-10-19 23:05:32 +02:00
srpt RDMA/srpt: Add a check for valid 'mad_agent' pointer 2023-05-11 23:00:36 +09:00
Makefile