Re: [PATCH] devcoredump: Fix circular locking dependency with devcd->mutex.

From: Johannes Berg
Date: Fri Oct 24 2025 - 04:51:32 EST


On Fri, 2025-10-24 at 10:37 +0200, Maarten Lankhorst wrote:
> >
> > CPU 0 CPU 1
> >
> > dev_coredump_put() devcd_del()
> > -> devcd_free()
> > -> locked
> > -> !deleted
> > -> __devcd_del()
> > -> __devcd_del()
> >
> > no?
> >
> > johannes
>
>
> Yeah don't you love the races in the design? All intricate and subtle.

:)

> In this case it's handled by disable_delayed_work_sync(),
> which waits for devcd_del() to be completed. devcd_del is called from the workqueue,
> and the first step devcd_free does is calling disable_delayed_work_sync, which means
> devcd_del() either fully completed or was not run at all.

Oh... right, I totally missed the _sync. My bad, sorry.

I guess I really should say

Reviewed-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>

since I finally _did_ review it carefully. Sorry it took forever.

johannes