Re: [PATCH 00/14] Stop lockdep_assert_held*() from assuming lock ownership
From: Marco Elver
Date: Wed Nov 11 2026 - 14:20:25 EST
On Wed, 11 Nov 2026 at 19:41, Bart Van Assche <bvanassche@xxxxxxx> wrote:
>
> On 11/11/26 3:17 AM, Marco Elver wrote:
> > I'm still not convinced by 8-14 esp. in light of my below Coccinelle
> > experiment.
>
> Hi Marco,
>
> Thank you for having shared your Coccinelle script. I think the script
> shows that the current implementation of lockdep_assert_held()
> suppresses warnings about missing __must_hold() annotations. So I think
> that your script confirms what I explained in the cover letter, namely
> that lockdep_assert_held() should be split into two macros: one macro
> that includes __assume_ctx_lock() and another macro that doesn't.
The point was that the Coccinelle script could be used to add those
annotations tree-wide. We do not need to make the lockdep API worse,
if the legacy-code problem is solved another way.