All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: David Rientjes <rientjes@google.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Ingo Molnar <mingo@elte.hu>, Borislav Petkov <bp@alien8.de>,
	Peter Zijlstra <peterz@infradead.org>,
	linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: WARNING: at kernel/lockdep.c:690 __lock_acquire+0x168/0x164b()
Date: Thu, 20 Oct 2011 14:36:44 -0700	[thread overview]
Message-ID: <20111020213644.GB25124@google.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1110201425560.5552@chino.kir.corp.google.com>

Hello,

On Thu, Oct 20, 2011 at 02:31:39PM -0700, David Rientjes wrote:
> > So, according to this thread, the problem is that the memset() clears
> > lock->name field, right?
> 
> Right, and reverting f59de8992aa6 ("lockdep: Clear whole lockdep_map on 
> initialization") seems to fix the lockdep warning.
> 
> > But how can that be a problem?  lock->name
> > is always set to either "NULL" or @name.  Why would clearing it before
> > setting make any difference?  What am I missing?
> > 
> 
> The scheduler (in sched_fair and sched_rt) calls lock_set_subclass() which 
> sets the name in double_unlock_balance() to set the name but there's a 
> race between when that is cleared with the memset() and setting of 
> lock->name where lockdep can find them to match.

Hmmm... so lock_set_subclass() is racing against lockdep_init()?  That
sounds very fishy and probably needs better fix.  Anyways, if someone
can't come up with proper solution, please feel free to revert the
commit.

Thanks.

-- 
tejun

  reply	other threads:[~2011-10-20 21:36 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-15 20:12 WARNING: at kernel/lockdep.c:690 __lock_acquire+0x168/0x164b() Sergey Senozhatsky
2011-10-15 21:42 ` David Rientjes
2011-10-15 22:23   ` Borislav Petkov
2011-10-15 22:32     ` David Rientjes
2011-10-16  5:09       ` Sergey Senozhatsky
2011-10-20 18:39       ` Borislav Petkov
2011-10-20 18:53         ` Sergey Senozhatsky
2011-10-20 19:07           ` Sergey Senozhatsky
2011-10-20 21:17             ` David Rientjes
2011-10-20 21:23               ` Tejun Heo
2011-10-20 21:31                 ` David Rientjes
2011-10-20 21:36                   ` Tejun Heo [this message]
2011-10-20 23:00                     ` Sergey Senozhatsky
2011-10-21  9:14                       ` David Rientjes
2011-10-21  9:26                         ` Sergey Senozhatsky
2011-10-21  9:45                         ` Yong Zhang
2011-11-03  7:17                           ` Sergey Senozhatsky
2011-11-03  7:27                             ` Yong Zhang
2011-11-03  7:45                               ` Sergey Senozhatsky
2011-11-03  7:53                                 ` Yong Zhang
2011-11-04  9:25                                   ` Borislav Petkov
2011-11-04  9:31                                     ` Sergey Senozhatsky
2011-11-07  4:54                                       ` Yong Zhang
2011-11-07  8:43                                         ` Sergey Senozhatsky
2011-11-04  9:34                                     ` Yong Zhang
2011-11-04  9:51                                       ` Sergey Senozhatsky

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=20111020213644.GB25124@google.com \
    --to=tj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=rientjes@google.com \
    --cc=sergey.senozhatsky@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.