From: ebiederm@xmission•com (Eric W. Biederman)
To: Stephen Rothwell <sfr@canb•auug.org.au>
Cc: Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
Linux Next Mailing List <linux-next@vger•kernel.org>
Subject: Re: linux-next: run time warning after merge of the userns tree
Date: Tue, 21 Dec 2021 11:44:02 -0600 [thread overview]
Message-ID: <875yrh7t0d.fsf@email.froward.int.ebiederm.org> (raw)
In-Reply-To: <20211221231611.785b74cf@canb.auug.org.au> (Stephen Rothwell's message of "Tue, 21 Dec 2021 23:16:11 +1100")
Stephen Rothwell <sfr@canb•auug.org.au> writes:
> Hi all,
>
> [I am just guessing at the userns tree.]
It is. This is a real brown paper bag bug. Somehow I got the sense
of the test wrong and did not notice the warning in my own testing.
The fix is just:
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 0404a8c572a1..ee222b89c692 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -9425,7 +9425,7 @@ void __init sched_init(void)
* if we want to avoid special-casing it in code that deals with per-CPU
* kthreads.
*/
- WARN_ON(set_kthread_struct(current));
+ WARN_ON(!set_kthread_struct(current));
/*
* Make us the idle thread. Technically, schedule() should not be
I will get that fixed in my for-next branch shortly.
>
> My qemu boot test of a powerpc pseries_le_defconfig kernel produced
> this warning:
>
> SLUB: HWalign=128, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
> ftrace: allocating 33453 entries in 13 pages
> ftrace: allocated 13 pages with 3 groups
> trace event string verifier disabled
> ------------[ cut here ]------------
> WARNING: CPU: 0 PID: 0 at kernel/sched/core.c:9469 sched_init+0x45c/0x4f4
> Modules linked in:
> CPU: 0 PID: 0 Comm: swapper Not tainted 5.16.0-rc6 #2
> NIP: c000000002027c98 LR: c000000002027c94 CTR: 0000000000000000
> REGS: c00000000278bb80 TRAP: 0700 Not tainted (5.16.0-rc6)
> MSR: 8000000002021033 <SF,VEC,ME,IR,DR,RI,LE> CR: 84000220 XER: 00000000
> CFAR: c00000000016c1fc IRQMASK: 1
> GPR00: c000000002027c94 c00000000278be20 c00000000278d300 0000000000000001
> GPR04: c000000000f88788 c000000002865d98 c000000007070680 0000000000000001
> GPR08: 000000007dae0000 c000000007070630 0000000000000000 0000000000000001
> GPR12: 0000000000000000 c000000002970000 0000000000000000 0000000000000000
> GPR16: 0000000002bf00d0 c0000000027c1f38 c00000000017e510 c000000002867f00
> GPR20: c0000000025306b8 c00000000017b520 c00000000017b200 c0000000028682b8
> GPR24: 0000000000000400 0000000000000000 c0000000027c2470 c0000000027b3a00
> GPR28: c0000000021af900 0000000000000800 0000000000000000 c00000007fc8f900
> NIP [c000000002027c98] sched_init+0x45c/0x4f4
> LR [c000000002027c94] sched_init+0x458/0x4f4
> Call Trace:
> [c00000000278be20] [c000000002027c94] sched_init+0x458/0x4f4 (unreliable)
> [c00000000278bed0] [c000000002004200] start_kernel+0x53c/0x8cc
> [c00000000278bf90] [c00000000000d39c] start_here_common+0x1c/0x600
> Instruction dump:
> 90ea0188 f92a0180 3d22fffb 39291890 39490050 7d005028 31080001 7d00512d
> 40c2fff4 e86d0908 4a144499 60000000 <0b030000> a08d0008 e86d0908 4bfff849
> ---[ end trace 0000000000000000 ]---
>
> Exposed by commit
>
> 40966e316f86 ("kthread: Ensure struct kthread is present for all kthreads")
prev parent reply other threads:[~2021-12-21 17:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-21 12:16 linux-next: run time warning after merge of the userns tree Stephen Rothwell
2021-12-21 17:44 ` Eric W. Biederman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875yrh7t0d.fsf@email.froward.int.ebiederm.org \
--to=ebiederm@xmission$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=sfr@canb$(echo .)auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox