Re: [PATCH v9] kernel/fork: beware of __put_task_struct calling context

From: Wander Lairson Costa
Date: Fri Jun 09 2023 - 15:08:57 EST


On Tue, Jun 6, 2023 at 5:40 PM Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
>
> On 06/05, Wander Lairson Costa wrote:
> >
> > Thanks. I found an unrelated earlier splat in the console code. That's
> > why I couldn't reproduce it in the stock kernel.
>
> As expected...
>
> So... Not sure what can I say ;) can you verify that this patch doesn't solve
> the issues with CONFIG_PROVE_RAW_LOCK_NESTING pointed out by Sebastian? Using
> stress-ng or anything else.
>

I managed to test it without a console. No issues happened in the stock kernel.

> This is not that bad, unless I am totally confused the current code (without
> your patch) has the same problem (otherwise we wouldn't need this fix).
>

That's my understanding as well.

> But perhaps you can make 2/2 which adds the DEFINE_WAIT_OVERRIDE_MAP() hack
> as Peter suggested?
>

Yes, sure. I would like to get the issue reproduced in practice to
make sure I am really fixing the problem. But I can live with that.

> Oleg.
>