Re: [PATCH 3/8] scsi: don't memset the entire scsi_cmnd in scsi_init_command

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

 



On Wed, Feb 23, 2022 at 12:16:24PM -0800, Bart Van Assche wrote:
> On 2/23/22 04:58, Christoph Hellwig wrote:
>> In general most of the zeroing here should go away entirely.  Right
>> now that code is a bit convolute due to the fake EH scsi command that
>> also uses scsi_init_command.  Once that is sorted out (I've just pinged
>> Hannes for his series) scsi_init_command can be folded into
>> scsi_prepare_cmd and a lot more of this can be cleaned up.
>
> Several SCSI LLDs rely on the SCSI core zeroing the driver-private data.
> I'd be more than happy if the code for zeroing of driver-private data would 
> be pushed into the LLD drivers. This may require the introduction of a new 
> per-command flag since that zeroing should only happen if scsi_queue_rq() 
> decided to call scsi_prepare_cmd().

If the driver provides a init_cmd_priv method it is not zeroed.  So if
a driver does not want it zeroed, it can always provide this callback,
including an empty one.



[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux