libata-core.c: ata_fill_sg() ... sanity check on arithmentic ?

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

 



Could someone more knowledgeable than me please reassure me ...

Referring to code in linux-2.6.22.1: libata-core.c (kernel.org),
in ata_fill_sg():

if sg_dma_address(sg) is 64k-aligned and sg_dma_len(sg) is 64k (0x10000),
then in the while loop, the "if ((offset..." test is false, since
it tests for *greater than* 64k

So then ap->prd[idx].flags_len gets set to (0x10000 & 0xFFFF) = 0 !

So this sg element ends up with a zero length, even though the
transfer size should be 64k.

Is this correct behaviour, if not, should it be corrected ?
Sorry if I'm just being paranoid !

Thanks,
MikeW

-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux