Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'iommu-fixes-v5.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu

Pull IOMMU fix from Joerg Roedel:
"Fix a possible NULL-ptr dereference in dev_iommu_priv_get() which is
too easy to accidentially trigger from IOMMU drivers.

In the current case the AMD IOMMU driver triggered it on some machines
in the IO-page-fault path, so fix it once and for all"

* tag 'iommu-fixes-v5.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
iommu: Check dev->iommu in dev_iommu_priv_get() before dereferencing it

+4 -1
+4 -1
include/linux/iommu.h
··· 616 616 617 617 static inline void *dev_iommu_priv_get(struct device *dev) 618 618 { 619 - return dev->iommu->priv; 619 + if (dev->iommu) 620 + return dev->iommu->priv; 621 + else 622 + return NULL; 620 623 } 621 624 622 625 static inline void dev_iommu_priv_set(struct device *dev, void *priv)