Re: [PATCH] scsi: Let scsi_execute_cmd() mark args->sshdr as invalid

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

 



On 19/05/2023 18:39, Bart Van Assche wrote:

Hi Bart,

       *args->resid = scmd->resid_len;
-    if (args->sense)
-        memcpy(args->sense, scmd->sense_buffer, SCSI_SENSE_BUFFERSIZE);
+    if (args->sense) {
+        *args->sense = scmd->sense_buffer;
+        scmd->sense_buffer = NULL;

I think that you will agree that this is not a good pattern to follow. We cannot have SCSI core allocating the sense buffer but a driver freeing it.

Thanks,
John



[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