[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230602173302.GA32644@redhat.com>
Date: Fri, 2 Jun 2023 19:34:04 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Wander Lairson Costa <wander@...hat.com>
Cc: "Russell King (Oracle)" <rmk+kernel@...linux.org.uk>,
Brian Cain <bcain@...cinc.com>,
Michael Ellerman <mpe@...erman.id.au>,
Stafford Horne <shorne@...il.com>,
Kefeng Wang <wangkefeng.wang@...wei.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"Liam R. Howlett" <Liam.Howlett@...cle.com>,
Vlastimil Babka <vbabka@...e.cz>,
"Matthew Wilcox (Oracle)" <willy@...radead.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Andrei Vagin <avagin@...il.com>,
Peter Zijlstra <peterz@...radead.org>,
"Paul E. McKenney" <paulmck@...nel.org>,
Daniel Bristot de Oliveira <bristot@...nel.org>,
Yu Zhao <yuzhao@...gle.com>,
Alexey Gladkov <legion@...nel.org>,
Mike Kravetz <mike.kravetz@...cle.com>,
Yang Shi <shy828301@...il.com>,
open list <linux-kernel@...r.kernel.org>,
Hu Chunyu <chuhu@...hat.com>,
Valentin Schneider <vschneid@...hat.com>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Steven Rostedt <rostedt@...dmis.org>,
Luis Goncalves <lgoncalv@...hat.com>
Subject: Re: [PATCH v9] kernel/fork: beware of __put_task_struct calling
context
On 06/01, Wander Lairson Costa wrote:
>
> On Thu, Jun 1, 2023 at 3:14 PM Oleg Nesterov <oleg@...hat.com> wrote:
> >
> > > but only in the RT kernel
> >
> > this again suggests that your testing was wrong or I am totally confused (quite
> > possible, I know nothing about RT). I did the testing without CONFIG_PREEMPT_RT.
> >
>
> Hrm, could you please share your .config?
Sure. I do not want to spam the list, I'll send you a private email.
Can you share your kernel module code?
Did you verify that debug_locks != 0 as I asked in my previous email ?
> > > But running the reproducer for put_task_struct(), works fine.
> >
> > which reproducer ?
> >
>
> Only now I noticed I didn't add the reproducer to the commit message:
>
> while true; do
> stress-ng --sched deadline --sched-period 1000000000
> --sched-runtime 800000000 --sched-deadline 1000000000 --mmapfork 23 -t
> 20
> done
Cough ;) I think we need a more simple one to enssure that
refcount_sub_and_test(nr, &t->usage) returns true under raw_spin_lock()
and then __put_task_struct() actually takes spin_lock().
Oleg.
Powered by blists - more mailing lists