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


Groups > linux.kernel > #1387431

Re: [PATCH] panic: lockdep: correct lock debugging state check

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH] panic: lockdep: correct lock debugging state check
Date 2016-04-26 14:50 +0200
Message-ID <rsaBc-7X7-5@gated-at.bofh.it> (permalink)
References <rs2tX-17F-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

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


Thread

[PATCH] panic: lockdep: correct lock debugging state check Yang Shi <yang.shi@linaro.org> - 2016-04-26 06:10 +0200
  Re: [PATCH] panic: lockdep: correct lock debugging state check Peter Zijlstra <peterz@infradead.org> - 2016-04-26 14:50 +0200
    Re: [PATCH] panic: lockdep: correct lock debugging state check "Shi, Yang" <yang.shi@linaro.org> - 2016-04-26 19:40 +0200

csiph-web