Re: idr_remove

From: Jim Houston
Date: Tue Feb 22 2005 - 13:31:49 EST


On Sat, 2005-02-19 at 07:32, Russell Coker wrote:
> 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.

Hi Russell, Everyone,

I believe that the warning is correct. It is intended to catch
the case where an id is freed without being allocated. The most
likely case is the teardown of the pty is calling idr_remove()
twice for the same id value. The other possible case is that
an id has not been allocated and idr_remove() is being called
by mistake.

I spent time looking at the pty and selinux code yesterday.
I had little luck finding where the selinux code hooks into
the pty code.

I have not used selinux. I have a recent Fedora FC3 install but I
didn't enable selinux. If you can give me cookbook directions,
I will try to reproduce the problem here.

I was hoping that changing the file permissions on /dev/pts might
produce the same effect. It prevent xterm from opening the pty but
it didn't cause the idr_remove() warning.

Jim Houston - Concurrent Computer Corp.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/