From: Rusty Russell <rusty@rustcorp.com.au>
To: Vegard Nossum <vegard.nossum@oracle.com>,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org,
Vegard Nossum <vegard.nossum@oracle.com>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH] sched/core: add taint on "BUG: sleeping function called from invalid context"
Date: Fri, 29 Jul 2016 10:52:09 +0930 [thread overview]
Message-ID: <8737mtz1a6.fsf@rustcorp.com.au> (raw)
In-Reply-To: <1469216762-19626-1-git-send-email-vegard.nossum@oracle.com>
Vegard Nossum <vegard.nossum@oracle.com> writes:
> Seeing this, it occurs to me that we should probably add a taint here:
Taint has traditionally meant "the user did something unsupported, take
the bug report with a grain of salt". Such as force removing a module.
So this seems wrong...
Cheers,
Rusty.
>
> BUG: sleeping function called from invalid context at mm/slab.h:388
> in_atomic(): 0, irqs_disabled(): 0, pid: 32211, name: trinity-c3
> Preemption disabled at:[<ffffffff811aaa37>] console_unlock+0x2f7/0x930
>
> CPU: 3 PID: 32211 Comm: trinity-c3 Not tainted 4.7.0-rc7+ #19
> ^^^^^^^^^^^
> Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014
> 0000000000000000 ffff8800b8a17160 ffffffff81971441 ffff88011a3c4c80
> ffff88011a3c4c80 ffff8800b8a17198 ffffffff81158067 0000000000000de6
> ffff88011a3c4c80 ffffffff8390e07c 0000000000000184 0000000000000000
> Call Trace:
> [...]
>
> BUG: sleeping function called from invalid context at arch/x86/mm/fault.c:1309
> in_atomic(): 0, irqs_disabled(): 0, pid: 32211, name: trinity-c3
> Preemption disabled at:[<ffffffff8119db33>] down_trylock+0x13/0x80
>
> CPU: 3 PID: 32211 Comm: trinity-c3 Not tainted 4.7.0-rc7+ #19
> ^^^^^^^^^^^
> Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014
> 0000000000000000 ffff8800b8a17e08 ffffffff81971441 ffff88011a3c4c80
> ffff88011a3c4c80 ffff8800b8a17e40 ffffffff81158067 0000000000000000
> ffff88011a3c4c80 ffffffff83437b20 000000000000051d 0000000000000000
> Call Trace:
> [...]
>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Rusty Russel <rusty@rustcorp.com.au>
> Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
> ---
> kernel/sched/core.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index 97ee9ac..7171cf9 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -7573,6 +7573,7 @@ void ___might_sleep(const char *file, int line, int preempt_offset)
> }
> #endif
> dump_stack();
> + add_taint(TAINT_WARN, LOCKDEP_STILL_OK);
> }
> EXPORT_SYMBOL(___might_sleep);
> #endif
> --
> 1.9.1
next prev parent reply other threads:[~2016-07-29 1:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-22 19:46 [PATCH] sched/core: add taint on "BUG: sleeping function called from invalid context" Vegard Nossum
2016-07-29 1:22 ` Rusty Russell [this message]
2016-07-29 6:29 ` Vegard Nossum
2016-07-29 13:01 ` Thomas Gleixner
2016-08-10 18:14 ` [tip:sched/core] sched/debug: Add taint on "BUG: Sleeping " tip-bot for Vegard Nossum
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=8737mtz1a6.fsf@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=vegard.nossum@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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