From: Petr Uzel Date: Fri, 21 Oct 2011 11:31:09 +0000 (+0200) Subject: [SCSI] st: fix race in st_scsi_execute_end X-Git-Tag: v3.2-rc1~44^2~32 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c68bf8eeaa57c852e74adcf597237be149eef830;p=pandora-kernel.git [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: Petr Uzel Reported-by: Juergen Groß Reviewed-by: Jan Kara Acked-by: Kai Mäkisara Signed-off-by: James Bottomley --- Reading git-diff-tree failed