From: "Lorenzo Hernández García-Hierro" <lorenzo@gnu.org>
To: russell@coker.com.au
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Jim Houston <jim.houston@ccur.com>,
selinux@tycho.nsa.gov
Subject: Re: idr_remove
Date: Tue, 22 Feb 2005 18:35:40 +0100 [thread overview]
Message-ID: <1109093740.4100.128.camel@localhost.localdomain> (raw)
In-Reply-To: <200502192332.54815.russell@coker.com.au>
[-- Attachment #1: Type: text/plain, Size: 1771 bytes --]
El sáb, 19-02-2005 a las 23:32 +1100, Russell Coker escribió:
> http://marc.theaimsgroup.com/?l=linux-kernel&m=109838483518162&w=2
>
> I am getting messages "idr_remove called for id=0 which is not allocated" when
> SE Linux denies search access to /dev/pts.
>
> The attached file has some klogd output showing the situation, triggered in
> this case by installing a new kernel package on a SE Debian system. The
> above URL references Jim Houston's message with the patch to add this
> warning.
The problem seems to be in a call back from idr_remove() to
sub_remove()@/lib/idr.c:284 which leads to calling idr_remove_warning(),
doing the weird stack dump, when some logics don't work as expected.
Jan 17 13:45:43 lyta kernel: [dump_stack+23/32] dump_stack+0x17/0x20
Jan 17 13:45:43 lyta kernel: [sub_remove+233/240] sub_remove+0xe9/0xf0
Jan 17 13:45:43 lyta kernel: [idr_remove+35/144] idr_remove+0x23/0x90
The spurious function called by sub_remove() (leads to the
dump_stack+0x17/0x20):
+static void idr_remove_warning(int id)
+{
+ printk("idr_remove called for id=%d which is not allocated.\n", id);
+ dump_stack();
+}
+
The changes that lead to such warning and stack dump
@sub_remove
+ n = id & IDR_MASK;
+ if (likely(p != NULL && test_bit(n, &p->bitmap))){
(...etc...)
idr_remove() is called, among other places, within the Device Mapper
(DM) code that I suppose you are using, right?
I don't have time to make further checking, but seems to be somewhat
type of devices handling and IDR minor numbers allocation tracking
black magic, someone could have a further a look at it?
Cheers,
--
Lorenzo Hernández García-Hierro <lorenzo@gnu.org>
[1024D/6F2B2DEC] & [2048g/9AE91A22][http://tuxedo-es.org]
[-- Attachment #2: Esta parte del mensaje está firmada digitalmente --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2005-02-22 17:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-19 12:32 idr_remove Russell Coker
2005-02-22 17:35 ` Lorenzo Hernández García-Hierro [this message]
2005-02-22 18:22 ` idr_remove Jim Houston
2005-02-22 18:32 ` idr_remove Stephen Smalley
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=1109093740.4100.128.camel@localhost.localdomain \
--to=lorenzo@gnu.org \
--cc=jim.houston@ccur.com \
--cc=linux-kernel@vger.kernel.org \
--cc=russell@coker.com.au \
--cc=selinux@tycho.nsa.gov \
/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
all inboxes | Powered by JetHome®