Re: [PATCH] ipr: don't doublefree pages from scatterlist

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

 



On Mon, 2006-02-06 at 16:45 +0000, Hugh Dickins wrote:
> But I'd also want James or someone to clarify the paragraph
> "Please note that the sg cannot be mapped again if it has been mapped once.
>  The mapping process is allowed to destroy information in the sg."
> which I took as explicitly allowing what x86_64 does in gart_map_sg.
> I thought James had a scenario in mind which demands this wholesale
> destruction, but it seems not; and I now read that first sentence as
> saying the sg must be unmapped before it can be mapped a second time,
> not that it can only be mapped once.
> 
> And add a paragraph explaining that really the one array of scatterlist
> entries should be regarded as two arrays of possibly different lengths,
> the page,offset,length array and the dma_address,dma_length array:
> because entries of the latter may be coalesced, so that in the end
> the dma_address in a scatterlength entry may bear no relation to the
> page pointer in that same entry, but to the page pointer in a later entry.
> Though it gets hard to explain given that not all architectures coalesce,
> so may not even have a separate dma_length field; or use different naming.
> If you can express this better than I, please do!

Yes, I added that piece after the x86_64 problem.  The original x86_64
bug was that you couldn't do dma_map_sg() then dma_unmap_sg() then
dma_map_sg() on the same scatterlist (the map was destroying information
which wasn't restored on the unmap, so the second map produced an
incorrect scatterlist), which was causing a bug in all SCSI drivers
(because that's the way SCSI requeueing works).

James


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

[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