Thread (34 messages) 34 messages, 7 authors, 2023-08-09

Re: [PATCH v2 00/10] Refine the locking for dev->iommu_group

From: Marek Szyprowski <m.szyprowski@samsung.com>
Date: 2023-08-08 14:52:42
Also in: linux-iommu, linux-rockchip, linux-sunxi

Hi Jason,

On 08.08.2023 16:30, Jason Gunthorpe wrote:
On Tue, Aug 08, 2023 at 04:02:40PM +0200, Marek Szyprowski wrote:
quoted
On 08.08.2023 15:25, Jason Gunthorpe wrote:
quoted
On Tue, Aug 08, 2023 at 03:08:30PM +0200, Marek Szyprowski wrote:
quoted
quoted
Any of the drivers that use platform device as the iommu_device will
have a problem, please try:

https://lore.kernel.org/linux-iommu/ZNIz%2FNVLb6WqqvQx@nvidia.com/ (local)
I've checked and it doesn't help in my case. I will soon check why.
Oh, I botched it. Forgot that the iommu_device->dev is the sysfs
handle not the HW device. Maybe this:
This fixed the early lockup, but then system hangs again a bit later. It
looks that this device lock in __iommu_probe_device() is really
problematic,
Yes, I expected we'd hit something like this - I checked alot of call
paths but missed these two. The self-probe is sneaky, but here the
device_lock is held way up the call chain, I just missed it.

The fix is to just annotate that we already hold the lock when calling
iommu_probe_device(), since we know in those cases that we must be
holding it:
Great, this fixed the issue. Feel free to add:

Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>

 > ...

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help