SCSI: scsi_lib: fix potential NULL dereference
commit 03b14708 upstream. Stanse found a potential NULL dereference in scsi_kill_request. Instead of triggering BUG() in 'if (unlikely(cmd == NULL))' branch, the kernel will Oops earlier on cmd dereference. Move the dereferences after the if. [ WT: starget is not set in 2.6.27 ] Signed-off-by:Jiri Slaby <jirislaby@gmail.com> Signed-off-by:
James Bottomley <James.Bottomley@suse.de> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by:
Willy Tarreau <w@1wt.eu>
Loading
Please sign in to comment