From: "Vegard Nossum" <vegard.nossum@gmail.com>
To: "Alan Cox" <alan@lxorguk.ukuu.org.uk>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: 2.6.25.11-97.fc9 (P): idr_remove called for id=236 which is not allocated
Date: Fri, 15 Aug 2008 23:26:28 +0200 [thread overview]
Message-ID: <19f34abd0808151426i69256b59m25a9a0676b50a6ba@mail.gmail.com> (raw)
In-Reply-To: <20080815162848.08ff793c@lxorguk.ukuu.org.uk>
On Fri, Aug 15, 2008 at 5:28 PM, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>> ida_remove called for id=112 which is not allocated.
>> ida_remove called for id=67 which is not allocated.
>> ida_remove called for id=191 which is not allocated.
>> ida_remove called for id=23 which is not allocated.
>>
>> ..and with no backtrace, so I guess it means "not harmful". Sorry for the noise.
>
> Thats definitely not good and wants digging into further.
Hi,
I've now been digging. This reproduces it accurately:
# mknod fubar c 128 42
# cat fubar
<ctrl-c>
idr_remove called for id=42 which is not allocated.
Major nr. 128 is UNIX98_PTY_MASTER_MAJOR. The
Documentation/devices.txt tells us to access these through /dev/ptmx
only. So when we don't follow that rule, tty_open() is called instead
of ptmx_open() when the device is opened. ptmx_open() would allocate a
new id to use. But since we call tty_open(), it will use tty->index
which is set from get_tty_driver() -- calculated using the minor
number that we provided!
The only thing I don't understand is why we don't get _two_ errors on
close() -- I would expect to get one for the slave too. But maybe the
slave is never created. What do you think of this theory?
Vegard
--
"The animistic metaphor of the bug that maliciously sneaked in while
the programmer was not looking is intellectually dishonest as it
disguises that the error is the programmer's own creation."
-- E. W. Dijkstra, EWD1036
next prev parent reply other threads:[~2008-08-15 21:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-15 15:11 Vegard Nossum
2008-08-15 15:26 ` Alan Cox
2008-08-15 15:27 ` Vegard Nossum
2008-08-15 15:28 ` Alan Cox
2008-08-15 15:50 ` Vegard Nossum
2008-08-15 21:26 ` Vegard Nossum [this message]
2008-08-18 22:15 ` Alan Cox
2008-08-19 6:53 ` Vegard Nossum
2008-08-19 8:29 ` Alan Cox
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=19f34abd0808151426i69256b59m25a9a0676b50a6ba@mail.gmail.com \
--to=vegard.nossum@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
/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®