Re: 6.18.13 iwlwifi deadlock allocating cma while work-item is active.

From: Johannes Berg

Date: Wed Mar 04 2026 - 01:57:22 EST


On Wed, 2026-03-04 at 11:08 +0800, Hillf Danton wrote:
> >
> > Fair. I don't know, I don't think there's anything that even shows that
> > there's a dependency between the two workqueues and the
> > "((wq_completion)events_unbound)" and "((wq_completion)events)", and
> > there would have to be for it to deadlock this way because of that?
> >
> Given the locks held [1],
>
> kworker/1:0/39480 kworker/u32:11/34989
> rtnl_mutex
> &rdev->wiphy.mtx
> __lru_add_drain_all
> flush_work(&per_cpu(lru_add_drain_work, cpu))
> &rdev->wiphy.mtx
>
> __if__ there is one work item queued __before__ one of the flush targets on
> workqueue and it acquires the rtnl mutex, then no deadlock can rise,
> because worker-xyz gets off CPU due to failing to take the rtnl lock then
> worker-xyz+1 dequeus the flush target and completes it due to nothing
> with rtnl. Same applies to the wiphy lock.

Right.

> BTW any chance for queuing work that acquires rtnl lock on mm_percpu_wq?

There really is only the work I was describing and vmstat_work (calling
vmstat_update) on that workqueue, afaict.

johannes