this patchset introduces code to debug drivers usage of the DMA-API.
Tests with hardware IOMMUs have shown several bugs in drivers regarding
the usage of that API.
Problems were found especially in network card drivers.
These bugs often don't show up or have any negative impact if there is
no hardware IOMMU in use in the system. But with an hardware IOMMU these
bugs turn the hardware unusable or, in the worst case, cause data
corruption on devices which are managed by other (good) drivers.
With the code these patches introduce driver developers can find several
bugs of misusing the DMA-API in their drivers. But be aware, it can not
find all possible bugs. If it finds a problem it prints out messages
tg3 0000:08:04.0: PCI-DMA: device driver tries to free DMA memory it has
not allocated [device address=0x000000042f0f3ae7] [size=48 bytes]
Pid: 6285, comm: bash Not tainted 2.6.28-rc5-00176-g6ae6379-dirty #6
or (from another machine with AMD IOMMU):
ixgbe 0000:02:00.0: PCI-DMA: device driver frees DMA memory with different
size [device address=0x0000000003fed812] [map size=258 bytes] [unmap
Pid: 6178, comm: rmmod Not tainted 2.6.28-rc5 #4
 ixgbe_down+0x2fd/0x3d0 [ixgbe]
 ixgbe_close+0x13/0xc0 [ixgbe]
 ixgbe_remove+0x48/0x16e [ixgbe]
This way driver developers get an idea where the problem is in their
Please review and send any objections or, if there are none, consider
for inclusion ;)
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html