* panic in dmar_remove_one_dev_info
@ 2019-12-16 20:57 Jerry Snitselaar
2019-12-17 6:13 ` Jerry Snitselaar
0 siblings, 1 reply; 2+ messages in thread
From: Jerry Snitselaar @ 2019-12-16 20:57 UTC (permalink / raw)
To: iommu, Lu Baolu, linux-kernel
HP is seeing a panic on gen9 dl360 and dl560 while testing these other
changes we've been eorking on. I just took an initial look, but have
to run to a dentist appointment so couldn't dig too deep. It looks
like the device sets dev->archdata.iommu to DEFER_DEVICE_DOMAIN_INFO
in intel_iommu_add_device, and then it needs a private domain so
dmar_remove_one_dev_info gets called. That code path ends up trying to
use DEFER_DEVICE_DOMAIN_INFO as a pointer. I don't need if there just
needs to be a check in there to bail out if it sees
DEFER_DEVICE_DOMAIN_INFO, or if something more is needed. I'll look
at it some more when I get back home.
Regards,
Jerry
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: panic in dmar_remove_one_dev_info
2019-12-16 20:57 panic in dmar_remove_one_dev_info Jerry Snitselaar
@ 2019-12-17 6:13 ` Jerry Snitselaar
0 siblings, 0 replies; 2+ messages in thread
From: Jerry Snitselaar @ 2019-12-17 6:13 UTC (permalink / raw)
To: iommu, Lu Baolu, linux-kernel
On Mon Dec 16 19, Jerry Snitselaar wrote:
>HP is seeing a panic on gen9 dl360 and dl560 while testing these other
>changes we've been eorking on. I just took an initial look, but have
>to run to a dentist appointment so couldn't dig too deep. It looks
>like the device sets dev->archdata.iommu to DEFER_DEVICE_DOMAIN_INFO
>in intel_iommu_add_device, and then it needs a private domain so
>dmar_remove_one_dev_info gets called. That code path ends up trying to
>use DEFER_DEVICE_DOMAIN_INFO as a pointer. I don't need if there just
>needs to be a check in there to bail out if it sees
>DEFER_DEVICE_DOMAIN_INFO, or if something more is needed. I'll look
>at it some more when I get back home.
>
>Regards,
>Jerry
Hi Baolu,
Does this look sane?
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -5163,7 +5163,8 @@ static void dmar_remove_one_dev_info(struct device *dev)
spin_lock_irqsave(&device_domain_lock, flags);
info = dev->archdata.iommu;
- if (info)
+ if (info && info != DEFER_DEVICE_DOMAIN_INFO
+ && info != DUMMY_DEVICE_DOMAIN_INFO)
__dmar_remove_one_dev_info(info);
spin_unlock_irqrestore(&device_domain_lock, flags);
}
Regards,
Jerry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-17 6:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-16 20:57 panic in dmar_remove_one_dev_info Jerry Snitselaar
2019-12-17 6:13 ` Jerry Snitselaar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).