kernel_samsung_a53x/drivers/infiniband/ulp
Bart Van Assche 0cd3af7f25 RDMA/srp: Do not call scsi_done() from srp_abort()
[ Upstream commit e193b7955dfad68035b983a0011f4ef3590c85eb ]

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: d8536670916a ("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>
2024-11-08 11:24:52 +01:00
..
ipoib Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
iser Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
isert Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
opa_vnic Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rtrs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
srp RDMA/srp: Do not call scsi_done() from srp_abort() 2024-11-08 11:24:52 +01:00
srpt Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00