Skip to content
Commit 03b14708 authored by Jiri Slaby's avatar Jiri Slaby Committed by James Bottomley
Browse files

[SCSI] scsi_lib: fix potential NULL dereference



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.

Signed-off-by: default avatarJiri Slaby <jirislaby@gmail.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent f619106b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment