From: Andrew Morton <akpm@linux-foundation.org>
To: Joseph Fannin <jhf@columbus.rr.com>
Cc: Reiner Sailer <sailer@us.ibm.com>,
linux-kernel@vger.kernel.org, sailer@watson.ibm.com,
serue@linux.vnet.ibm.com, zohar@linux.vnet.ibm.com,
Ingo Molnar <mingo@elte.hu>
Subject: Re: 2.6.21-rc6-mm1 ima "BUG: held lock freed!"
Date: Wed, 11 Apr 2007 12:52:17 -0700 [thread overview]
Message-ID: <20070411125217.17734a5b.akpm@linux-foundation.org> (raw)
In-Reply-To: <1176299718.14723.3.camel@localhost.localdomain>
On Wed, 11 Apr 2007 09:55:18 -0400
Joseph Fannin <jhf@columbus.rr.com> wrote:
> On Tue, 2007-04-10 at 15:00 -0400, Reiner Sailer wrote:
> > Joseph,
> >
> > we cannot reproduce the BUG you report. We have identified a potential
> > source (spinlock around mutex_init). I have attached a small patch that
> > removes this lock from the initialization of the hash table. I have
> > tested the patch but I cannot verify if this resolves the problem you
> > are seeing.
> >
> > If you can reproduce the problem, would you mind to apply this patch and
> > let us know if this solves the problem?
>
> The BUG message no longer appears with this patch applied. It was 100%
> reproducible before, so I think this fixed it.
ok, the spinlock in there was unneeded anwyay.
But I think this is a lockdep shortcoming - there's nothing wrong with
doing mutex_init() inside spin_lock().
debug_mutex_init() is trying to work out whether we're initialising
an already held mutex. This has nothing to do with the spinlock
which we're holding. Perhaps debug_check_no_locks_freed() simply
went wrong.
For Ingo - this:
=========================
[ BUG: held lock freed! ]
-------------------------
swapper/1 is freeing memory c04c7660-c04c76a3, with a lock still held there!
(ima_queue_lock){--..}, at: [<c0202710>] ima_create_htable+0x10/0x90
1 lock held by swapper/1:
#0: (ima_queue_lock){--..}, at: [<c0202710>] ima_create_htable+0x10/0x90
stack backtrace:
[<c0105959>] dump_trace+0x1d9/0x210
[<c01059aa>] show_trace_log_lvl+0x1a/0x30
[<c0106612>] show_trace+0x12/0x20
[<c01066d6>] dump_stack+0x16/0x20
[<c014fd3a>] debug_check_no_locks_freed+0x17a/0x180
[<c014cdbf>] debug_mutex_init+0x1f/0x50
[<c0145451>] __mutex_init+0x41/0x50
[<c020277d>] ima_create_htable+0x7d/0x90
[<c020286f>] ima_init+0x3f/0x270
[<c051b765>] init_evm+0x1f5/0x250
[<c05015d2>] kernel_init+0x132/0x320
[<c010532f>] kernel_thread_helper+0x7/0x18
=======================
is coming out of -mm's security/evm/ima/ima_queue.c:ima_create_htable().
next prev parent reply other threads:[~2007-04-11 19:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-10 12:58 2.6.21-rc6-mm1 ima "BUG: held lock freed!" Reiner Sailer
2007-04-10 19:00 ` Reiner Sailer
2007-04-11 13:55 ` Joseph Fannin
2007-04-11 19:52 ` Andrew Morton [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-04-08 21:35 2.6.21-rc6-mm1 Andrew Morton
2007-04-10 11:28 ` 2.6.21-rc6-mm1 ima "BUG: held lock freed!" Joseph Fannin
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=20070411125217.17734a5b.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=jhf@columbus.rr.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=sailer@us.ibm.com \
--cc=sailer@watson.ibm.com \
--cc=serue@linux.vnet.ibm.com \
--cc=zohar@linux.vnet.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox