summaryrefslogtreecommitdiff
path: root/drivers/iommu/amd/init.c
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@nvidia.com>2025-12-17 13:43:04 -0400
committerJoerg Roedel <joerg.roedel@amd.com>2025-12-18 11:32:10 +0100
commit7a089c5d35aa307147e78c5cbeeb1352b92790b1 (patch)
treedb7ac71c509674064470730064ce140bee4e13b8 /drivers/iommu/amd/init.c
parent8f0b4cce4481fb22653697cced8d0d04027cb1e8 (diff)
iommupt: Return ERR_PTR from _table_alloc()
syzkaller noticed that with fault injection a failure inside iommu_alloc_pages_node_sz() oops's in PT_FEAT_DMA_INCOHERENT because it goes on to make NULL incoherent. Closer inspection shows the return value has become confused, the alloc routines on the iommupt side expect ERR_PTR while iommu_alloc_pages_node_sz() returns NULL. Error out early to fix both issues. Fixes: aefd967dab64 ("iommupt: Use the incoherent start/stop functions for PT_FEAT_DMA_INCOHERENT") Fixes: dcd6a011a8d5 ("iommupt: Add map_pages op") Fixes: cdb39d918579 ("iommupt: Add the basic structure of the iommu implementation") Reported-by: syzbot+e06bb7478e687f235ad7@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/693a39de.050a0220.4004e.02ce.GAE@google.com/ Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'drivers/iommu/amd/init.c')
0 files changed, 0 insertions, 0 deletions