From: Joerg Roedel Date: Thu, 21 Aug 2014 20:32:08 +0000 (+0200) Subject: iommu/core: Make iommu_group_get_for_dev() more robust X-Git-Tag: fixes-for-v3.18-merge-window~141^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4a783b89ee3fc1201510ecf204278da4ccb0993;p=pandora-kernel.git iommu/core: Make iommu_group_get_for_dev() more robust When a non-PCI device is passed to that function it might pass group == NULL to iommu_group_add_device() which then dereferences it and cause a crash this way. Fix it by just returning an error for non-PCI devices. Fixes: 104a1c13ac66e40cf8c6ae74d76ff14ff24b9b01 Cc: Alex Williamson Acked-by: Alex Williamson Signed-off-by: Joerg Roedel --- Reading git-diff-tree failed