OSDN Git Service

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)
committerDavid Keitel <dkeitel@codeaurora.org>
Tue, 22 Mar 2016 18:14:37 +0000 (11:14 -0700)
commit93e644714da679151cb922b44abe65a5219fff30
tree7451bd921e94d4bc0709fc84c4373b4b1f90c4b0
parent56384cba239eb378c663f853352bcaec97da4817
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