Re: tty-related oops in latest kernel(s)?

From: Pekka Enberg
Date: Tue May 29 2007 - 14:57:52 EST


Hi Tero,

On 5/29/07, Tero Roponen <teanropo@xxxxxx> wrote:
FYI, I just tested 2.6.21.3. I couldn't reproduce the problem with
that kernel.

Well, I went through all tty related patches that went in after 2.6.21
and didn't really find anything interesting, except this:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=543691a6cd70b606dd9bed5e77b120c5d9c5c506

But it does seem correct. You could try reverting that from 2.6.22-rc3
and see if you can trigger the bug.

Looking at the original report again:

release_dev: driver.table[3] not tty for (tty4)

So tty from filp->private_data does not match
tty->driver->ttys[tty->index] and release_dev bails out (thus messing
up reference count).

Warning: dev (tty4) tty->count(3) != #fd's(2) in release_dev
release_dev: driver.table[3] not tty for (tty4)

Presumably someone tries to close the file again which is why we get a
new complaint that reference counting has gone bad.

Unfortunately, I have no idea why drivers->tty does not match. It
could be a race with release_tty() or real use-after-free but I am
unable to find anything obvious in 2.6.21 -> 2.6.22-rc3 that would
break it. Doing the git bisect dance here would really help...
-
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/