RE: [PATCH] [RESEND] scsi_debug: fix sanity check in resp_rsup_opcodes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello there,

----------------------------------------
> David Binderman pointed out in this post:
>
> http://marc.info/?l=linux-scsi&m=141924469523474&w=2
>
> a sanity check that was flawed. See attached fix. Should
> be applied to lk 3.19.0-rc2 and Christoph's branches.

Actually, there is another fault in the same source code file:

Checking drivers/scsi/scsi_debug.c...
[drivers/scsi/scsi_debug.c:3844] -> [drivers/scsi/scsi_debug.c:3846]: (warning) Possible null pointer dereference: cmnd - otherwise it is redundant to check it against null.

Source code is

    struct scsi_device *sdp = cmnd->device;

    if (NULL == cmnd || NULL == devip) {

Suggest postpone use of cmnd until *after* it has been sanity checked.

Regards

David Binderman
 		 	   		  --
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux