Re: [syzbot] WARNING in kthread_is_per_cpu

2021-04-20 Thread Valentin Schneider
On 20/04/21 12:11, Peter Zijlstra wrote: > On Tue, Apr 20, 2021 at 10:43:43AM +0100, Valentin Schneider wrote: >> On 20/04/21 10:51, Peter Zijlstra wrote: > >> > I think free_kthread_struct() is ok, because a task at that point in its >> > lifetime cannot be also doing exec(). >> > >> >> What if

Re: [syzbot] WARNING in kthread_is_per_cpu

2021-04-20 Thread Peter Zijlstra
On Tue, Apr 20, 2021 at 10:43:43AM +0100, Valentin Schneider wrote: > On 20/04/21 10:51, Peter Zijlstra wrote: > > I think free_kthread_struct() is ok, because a task at that point in its > > lifetime cannot be also doing exec(). > > > > What if it's one of those kthreads created by directly

Re: [syzbot] WARNING in kthread_is_per_cpu

2021-04-20 Thread Valentin Schneider
On 20/04/21 10:51, Peter Zijlstra wrote: > On Mon, Apr 19, 2021 at 08:58:26PM +0100, Valentin Schneider wrote: > >> Looks about right, IIUC the key being: >> >> p->flags & PF_KTHREAD + p->set_child_tid => the struct kthread is >> persistent >> >> p->flags & PF_KTHREAD => you may or may not

Re: [syzbot] WARNING in kthread_is_per_cpu

2021-04-20 Thread Peter Zijlstra
On Mon, Apr 19, 2021 at 08:58:26PM +0100, Valentin Schneider wrote: > Looks about right, IIUC the key being: > > p->flags & PF_KTHREAD + p->set_child_tid => the struct kthread is > persistent > > p->flags & PF_KTHREAD => you may or may not have a struct kthread (see > kernel/umh.c

Re: [syzbot] WARNING in kthread_is_per_cpu

2021-04-19 Thread Valentin Schneider
On 19/04/21 20:45, Peter Zijlstra wrote: > On Mon, Apr 19, 2021 at 12:31:22PM +0100, Valentin Schneider wrote: > >> if ((p->flags & PF_KTHREAD) && kthread_is_per_cpu(p)) >> `\ >>to_kthread(p); >>

Re: [syzbot] WARNING in kthread_is_per_cpu

2021-04-19 Thread Peter Zijlstra
On Mon, Apr 19, 2021 at 12:31:22PM +0100, Valentin Schneider wrote: > if ((p->flags & PF_KTHREAD) && kthread_is_per_cpu(p)) > `\ >to_kthread(p); > `\ >

Re: [syzbot] WARNING in kthread_is_per_cpu

2021-04-19 Thread Valentin Schneider
On 19/04/21 03:36, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:1216f02e Add linux-next specific files for 20210415 > git tree: linux-next > console output: https://syzkaller.appspot.com/x/log.txt?x=1032ba29d0 > kernel config:

Re: [syzbot] WARNING in kthread_is_per_cpu

2021-04-19 Thread Thomas Gleixner
On Mon, Apr 19 2021 at 03:36, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:1216f02e Add linux-next specific files for 20210415 > git tree: linux-next > console output: https://syzkaller.appspot.com/x/log.txt?x=1032ba29d0 > kernel config:

[syzbot] WARNING in kthread_is_per_cpu

2021-04-19 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:1216f02e Add linux-next specific files for 20210415 git tree: linux-next console output: https://syzkaller.appspot.com/x/log.txt?x=1032ba29d0 kernel config: https://syzkaller.appspot.com/x/.config?x=3491b04113499f81 dashboard