Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1459875

[tip:sched/core] sched/debug: Add taint on "BUG: Sleeping function called from invalid context"

Path csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod
From tip-bot for Vegard Nossum <tipbot@zytor.com>
Newsgroups linux.kernel
Subject [tip:sched/core] sched/debug: Add taint on "BUG: Sleeping function called from invalid context"
Date Wed, 10 Aug 2016 22:40:03 +0200
Message-ID <s4Isb-1A3-61@gated-at.bofh.it> (permalink)
References <rXOCm-1EM-11@gated-at.bofh.it>
X-Original-To linux-tip-commits@vger.kernel.org
Reply-To hpa@zytor.com, torvalds@linux-foundation.org, vegard.nossum@oracle.com, peterz@infradead.org, rusty@rustcorp.com.au, efault@gmx.de, linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@kernel.org, paulmck@linux.vnet.ibm.com, akpm@linux-foundation.org
Git-Commit-ID f0b22e39e3409109d40ef036b1f46b419e82f58e
X-Mailer tip-git-log-daemon
Robot-ID <tip-bot.git.kernel.org>
Robot-Unsubscribe Contact <mailto:hpa@kernel.org> to get blacklisted from these emails
MIME-Version 1.0
Content-Transfer-Encoding 8bit
Content-Type text/plain; charset=UTF-8
Content-Disposition inline
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 63
Organization linux.* mail to news gateway
X-Original-Cc paulmck@linux.vnet.ibm.com, mingo@kernel.org, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, rusty@rustcorp.com.au, efault@gmx.de, vegard.nossum@oracle.com, peterz@infradead.org, torvalds@linux-foundation.org, hpa@zytor.com
X-Original-Date Wed, 10 Aug 2016 11:14:36 -0700
X-Original-Message-ID <tip-f0b22e39e3409109d40ef036b1f46b419e82f58e@git.kernel.org>
X-Original-References <1469216762-19626-1-git-send-email-vegard.nossum@oracle.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1459875

Show key headers only | View raw


Commit-ID:  f0b22e39e3409109d40ef036b1f46b419e82f58e
Gitweb:     http://git.kernel.org/tip/f0b22e39e3409109d40ef036b1f46b419e82f58e
Author:     Vegard Nossum <vegard.nossum@oracle.com>
AuthorDate: Fri, 22 Jul 2016 21:46:02 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 10 Aug 2016 16:13:48 +0200

sched/debug: Add taint on "BUG: Sleeping function called from invalid context"

Seeing this, it occurs to me that we should probably add a taint here:

    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:
    [...]

Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rusty Russel <rusty@rustcorp.com.au>
Link: http://lkml.kernel.org/r/1469216762-19626-1-git-send-email-vegard.nossum@oracle.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 kernel/sched/core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index a656816..3b6b23c 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -7608,6 +7608,7 @@ void ___might_sleep(const char *file, int line, int preempt_offset)
 		pr_cont("\n");
 	}
 	dump_stack();
+	add_taint(TAINT_WARN, LOCKDEP_STILL_OK);
 }
 EXPORT_SYMBOL(___might_sleep);
 #endif

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[tip:sched/core] sched/debug: Add taint on "BUG: Sleeping function  called from invalid context" tip-bot for Vegard Nossum <tipbot@zytor.com> - 2016-08-10 22:40 +0200

csiph-web