Re: [PATCH] iommu/s390: Fix NULL dereference in iova_to_phys() with ZPCI_TABLE_TYPE_RFX
Vasily Gorbik <[email protected]>
| Newsgroups | dev.linux.lists.iommu,org.kernel.vger.linux-kernel,org.kernel.vger.linux-s390 |
|---|---|
| Message-ID | <[email protected]> |
On Sun, Aug 23, 2026 at 11:00:33PM +0200, Vasily Gorbik wrote: > On Tue, Aug 18, 2026 at 09:13:17PM +0200, Niklas Schnelle wrote: > > When using a 5-level translation table via ZPCI_TABLE_TYPE_RFX > > get_rso_from_iova() returns NULL when the region-first entry is invalid. > > Yet in get_rto_from_iova() the region-second origin rso is not checked > > to be non-NULL before accessing rso[rsx] leading to a NULL pointer > > dereference instead of a NULL return when iova_to_phys() is called on > > a unmapped IOVA. Fix this by adding the missing NULL check. > > > > Cc: [email protected] > > Fixes: 81244074b518 ("iommu/s390: allow larger region tables") > > Signed-off-by: Niklas Schnelle <[email protected]> > > --- > > drivers/iommu/s390-iommu.c | 2 ++ > > 1 file changed, 2 insertions(+) > > Applied, thank you! Oh, I was too eager here. Please disregard my previous "Applied" message. This usually goes via IOMMU subsystem tree and not s390 tree. Joerg, Will, I'll leave this one to you. Sorry for the confusion.