On 10/10/19 5:05 AM, zhengbin wrote:
+       /*
+        * need to initial sshdr to avoid uninit-value access
+        */
+       if (sshdr)
+               memset(sshdr, 0, sizeof(struct scsi_sense_hdr));
+

I think the above comment is slightly confusing because it is correct for some callers but not for all callers of scsi_execute(). How about changing the comment into something like the following: "Zero-initialize sshdr for those callers that check the *sshdr contents even if no sense data is available"?

Thanks,

Bart.

Reply via email to