From: Bart Van Assche Date: Fri, 29 Jun 2012 15:34:26 +0000 (+0000) Subject: Avoid dangling pointer in scsi_requeue_command() X-Git-Tag: v3.2.25~19 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09411e4280933eb335e1f723dc215a5583c3be8f;p=pandora-kernel.git Avoid dangling pointer in scsi_requeue_command() commit 940f5d47e2f2e1fa00443921a0abf4822335b54d upstream. When we call scsi_unprep_request() the command associated with the request gets destroyed and therefore drops its reference on the device. If this was the only reference, the device may get released and we end up with a NULL pointer deref when we call blk_requeue_request. Reported-by: Mike Christie Signed-off-by: Bart Van Assche Reviewed-by: Mike Christie Reviewed-by: Tejun Heo [jejb: enhance commend and add commit log for stable] Signed-off-by: James Bottomley Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed