Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751951AbcDZMkA (ORCPT ); Tue, 26 Apr 2016 08:40:00 -0400 Received: from merlin.infradead.org ([205.233.59.134]:44274 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751082AbcDZMkA (ORCPT ); Tue, 26 Apr 2016 08:40:00 -0400 Date: Tue, 26 Apr 2016 14:39:55 +0200 From: Peter Zijlstra To: Yang Shi Cc: mingo@redhat.com, linux-kernel@vger.kernel.org, linaro-kernel@lists.linaro.org Subject: Re: [PATCH] panic: lockdep: correct lock debugging state check Message-ID: <20160426123955.GT3448@twins.programming.kicks-ass.net> References: <1461641797-9368-1-git-send-email-yang.shi@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1461641797-9368-1-git-send-email-yang.shi@linaro.org> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 944 Lines: 18 On Mon, Apr 25, 2016 at 08:36:37PM -0700, Yang Shi wrote: > When kernel oops happens, lock debugging is turned off by debug_locks_off() > in oops_enter() via calling __debug_locks_off() which set debug_locks to 0 > via xchg(). But, calling to __debug_locks_off() to check lock debugging state > in add_taint() called by oops_end() will always return false since xchg() > returns the old value of debug_locks which is cleared in oops_enter() already. > > This prevents add_taint() from printing out lock debugging disable information > although LOCKDEP_NOW_UNRELIABLE is passed to it. > > Check lock debugging state via !debug_locks to fix this. Although > !__debug_locks_off() could do the same thing, it may look confusing. > What are you smoking? This is the second completely insane patch you send this week. This breaks add_taint() and gains us nothing except trivialities. Who bloody cares about that print if you've just had an OOPS.