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-fix-v5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu

Pull IOMMU fix from Joerg Roedel:
"Fix a NULL-pointer dereference issue in the ACPI device matching code
of the AMD IOMMU driver"

* tag 'iommu-fix-v5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
iommu/amd: Fix NULL dereference bug in match_hid_uid

+6 -2
+6 -2
drivers/iommu/amd_iommu.c
··· 140 140 static inline int match_hid_uid(struct device *dev, 141 141 struct acpihid_map_entry *entry) 142 142 { 143 + struct acpi_device *adev = ACPI_COMPANION(dev); 143 144 const char *hid, *uid; 144 145 145 - hid = acpi_device_hid(ACPI_COMPANION(dev)); 146 - uid = acpi_device_uid(ACPI_COMPANION(dev)); 146 + if (!adev) 147 + return -ENODEV; 148 + 149 + hid = acpi_device_hid(adev); 150 + uid = acpi_device_uid(adev); 147 151 148 152 if (!hid || !(*hid)) 149 153 return -ENODEV;