All of lore.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: linux-edac <linux-edac@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: lockdep: BUG: key ffff880436f00330 not in .data!
Date: Sun, 12 May 2013 17:37:22 +0200	[thread overview]
Message-ID: <20130512153721.GC5589@pd.tnic> (raw)
In-Reply-To: <20130509200108.GA17309@pd.tnic>

On Thu, May 09, 2013 at 10:01:08PM +0200, Borislav Petkov wrote:
> On Thu, May 09, 2013 at 11:28:08AM -0300, Mauro Carvalho Chehab wrote:
> > Could you please check if ghes_edac also got registered there?

Ok, I got it:

[    5.430408] BUG: key ffff88043c320330 not in .data!
[    5.431043] ------------[ cut here ]------------
[    5.431776] WARNING: at kernel/lockdep.c:2987 lockdep_init_map+0x555/0x590()
[    5.432512] DEBUG_LOCKS_WARN_ON(1)

basically means we're using dynamically allocated memory for the
lock_key. And the last can thus disappear, which is Not Good(tm).

This happens because the EDAC instance probing functions do
edac_mc_alloc() to allocate the mci which also contains embedded in it:

	struct bus_type                 bus;

and the bus_register() call in edac_create_sysfs_mci_device() hands down
this struct bus_type to lockdep.

The patch which introduced the bus_register() call in
edac_create_sysfs_mci_device() is

--
commit de3910eb79ac8c0f29a11224661c0ebaaf813039
Author: Mauro Carvalho Chehab <mchehab@redhat.com>
Date:   Tue Apr 24 15:05:43 2012 -0300

    edac: change the mem allocation scheme to make Documentation/kobject.txt happy
--

which means we need a fix since this affects all edac drivers, not only
sb_edac, as initially surmised.

Thanks.

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

      reply	other threads:[~2013-05-12 15:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-09 11:01 lockdep: BUG: key ffff880436f00330 not in .data! Borislav Petkov
2013-05-09 14:28 ` Mauro Carvalho Chehab
2013-05-09 20:01   ` Borislav Petkov
2013-05-12 15:37     ` Borislav Petkov [this message]

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=20130512153721.GC5589@pd.tnic \
    --to=bp@alien8.de \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@redhat.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.