]> git.baikalelectronics.ru Git - kernel.git/commit
iommu: Do more input validation in iommu_map_sg()
authorJoerg Roedel <jroedel@suse.de>
Tue, 4 Nov 2014 13:53:51 +0000 (14:53 +0100)
committerJoerg Roedel <jroedel@suse.de>
Tue, 4 Nov 2014 13:53:51 +0000 (14:53 +0100)
commit76a018d6e4c8606dd0966cca41b966bc456f82a8
tree7e54787fbc0961a02707f38e5b39bfa2f22605c4
parent7a05e27f3d9289698dc686fd3c36bc1027143db9
iommu: Do more input validation in iommu_map_sg()

The IOMMU-API works on page boundarys, unlike the DMA-API
which can work with sub-page buffers. The sg->offset
field does not make sense on the IOMMU level, so force it to
be 0. Do some error-path consolidation while at it.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/iommu.c