Re: [PATCH] sd: Protect against submitting READ(6) or WRITE(6) with 256 logical blocks

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

 



Bart,

>> While the WARN_ON here looks helpful shouldn't we instead ensure that
>> sd_setup_rw6_cmnd never gets called with a 0 argument instead of bailing
>> out like this?
>
> Before I posted this patch I searched for code that submits read or
> write requests with length 0 but I haven't found any. do_iter_read()
> and do_iter_write() in fs/read_write.c do not submit any block layer
> requests if tot_len == 0. Are you perhaps aware of kernel code that
> can submit zero-length read or write requests?

At some level I would have liked the sanity check in the top rw prep
command. However, given that a zero transfer length is mostly a
hypothetical scenario I tend to concur with sticking the check in rw6
outside of the hot path.

-- 
Martin K. Petersen	Oracle Linux Engineering



[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