From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752107AbcG2GaS (ORCPT ); Fri, 29 Jul 2016 02:30:18 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:20841 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750799AbcG2GaP (ORCPT ); Fri, 29 Jul 2016 02:30:15 -0400 Subject: Re: [PATCH] sched/core: add taint on "BUG: sleeping function called from invalid context" To: Rusty Russell , Ingo Molnar , Peter Zijlstra References: <1469216762-19626-1-git-send-email-vegard.nossum@oracle.com> <8737mtz1a6.fsf@rustcorp.com.au> Cc: linux-kernel@vger.kernel.org, "Paul E. McKenney" , Thomas Gleixner , Ingo Molnar From: Vegard Nossum Message-ID: <579AF7C2.9020009@oracle.com> Date: Fri, 29 Jul 2016 08:29:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <8737mtz1a6.fsf@rustcorp.com.au> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/29/2016 03:22 AM, Rusty Russell wrote: > Vegard Nossum 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... There are many types of taints. This is the one you mentioned: 2 - A module was force loaded by insmod -f. This is the one I'd like to set: 512 - A kernel warning has occurred. (from Documentation/sysctl/kernel.txt). The flag I want to set is also set on any kind of WARN(). >> 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:[] console_unlock+0x2f7/0x930 I am not proposing this patch on a whim: it was actually hiding real bugs because I only saw an oops that happened later when in fact the real bug happened where the "sleeping function called from invalid context" was called. Vegard