Re: [PATCH] scsi: scsi_debug: Fix do_device_access() handling of unexpected SG copy length

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

 



On Fri, Oct 18, 2024 at 10:16:55AM +0000, John Garry wrote:
> If the sg_copy_buffer() call returns less than sdebug_sector_size, then we
> drop out of the copy loop. However, we still report that we copied the
> full expected amount, which is not proper.
> 
> Fix by keeping a running total and return that value.
> 
> Fixes: 84f3a3c01d70 ("scsi: scsi_debug: Atomic write support")
> Reported-by: Colin Ian King <colin.i.king@xxxxxxxxx>
> Suggested-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> Signed-off-by: John Garry <john.g.garry@xxxxxxxxxx>

Looks good to me.

Reviewed-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

regards,
dan carpenter





[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