diff options
| author | Diego Fernando Mancera Gomez <diegomancera.dev@gmail.com> | 2026-07-23 13:56:54 -0600 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-09-10 14:43:07 +0200 |
| commit | d937ca39cc44a01ce64865dd25b1e205a05ae3a0 (patch) | |
| tree | 803d913a568e7a585c25ac80215d614806e156be | |
| parent | aa106357b4d8491245c272422237942e1e19a631 (diff) | |
| download | linux-next-d937ca39cc44a01ce64865dd25b1e205a05ae3a0.tar.gz linux-next-d937ca39cc44a01ce64865dd25b1e205a05ae3a0.zip | |
usb: image: microtek: stop SG processing after transfer errors
When an SG URB completes with an error, mts_do_sg() calls
mts_transfer_cleanup(), which completes the SCSI command through
scsi_done(). However, the callback continues advancing the scatterlist
and may submit another URB for a command that has already been
completed.
Return immediately after the cleanup so that no further processing is
performed on the completed command.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Diego Fernando Mancera Gomez <diegomancera.dev@gmail.com>
Acked-by: Oliver Neukum <oneukum@suse.com>
Link: https://patch.msgid.link/20260723195654.152104-1-diegomancera.dev@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/usb/image/microtek.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/image/microtek.c b/drivers/usb/image/microtek.c index 1f0b3c44d388..787cf5aba55d 100644 --- a/drivers/usb/image/microtek.c +++ b/drivers/usb/image/microtek.c @@ -475,6 +475,7 @@ static void mts_do_sg (struct urb* transfer) if (unlikely(status)) { set_host_byte(context->srb, (status == -ENOENT ? DID_ABORT : DID_ERROR)); mts_transfer_cleanup(transfer); + return; } context->curr_sg = sg_next(context->curr_sg); |
