Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c68bf8ee authored by Petr Uzel's avatar Petr Uzel Committed by James Bottomley
Browse files

[SCSI] st: fix race in st_scsi_execute_end



The call to complete() in st_scsi_execute_end() wakes up sleeping thread
in write_behind_check(), which frees the st_request, thus invalidating
the pointer to the associated bio structure, which is then passed to the
blk_rq_unmap_user(). Fix by storing pointer to bio structure into
temporary local variable.

This bug is present since at least linux-2.6.32.

CC: stable@kernel.org
Signed-off-by: default avatarPetr Uzel <petr.uzel@suse.cz>
Reported-by: default avatarJuergen Groß <juergen.gross@ts.fujitsu.com>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Acked-by: default avatarKai Mäkisara <kai.makisara@kolumbus.fi>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent 3308511c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment