BUG in tty_open when using containers and ptrace

Grzegorz Nosek root at localdomain.pl
Thu Jul 23 11:26:20 PDT 2009


On śro, lip 22, 2009 at 06:48:55 -0700, H. Peter Anvin wrote:
> > | Bisecting...

OK, the first bad commit is:
commit 4a2b5fddd53b80efcb3266ee36e23b8de28e761a
Author: Sukadev Bhattiprolu <sukadev at us.ibm.com>
Date:   Mon Oct 13 10:42:49 2008 +0100

    Move tty lookup/reopen to caller

    Move tty_driver_lookup_tty() and tty_reopen() from tty_init_dev()
    into tty_open() (one of the two callers of tty_init_dev()).  These
    calls are not really required in ptmx_open(), the other caller,
    since ptmx_open() would be setting up a new tty.

    Changelog[v2]:
        - remove the lookup and reopen calls from ptmx_open
        - merge with recent changes to ttydev tree

    Signed-off-by: Sukadev Bhattiprolu <sukadev at us.ibm.com>
    Signed-off-by: Alan Cox <alan at redhat.com>
    Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>

However, with HEAD there the behaviour is slightly different as the
kernel does not crash (loudly) and the open succeeds but silently
leaves the tty layer locked, so it's just as bad.

The oops itself is introduced by:
commit 527b3e4773628b30d03323a2cb5fb0d84441990f
Author: Sukadev Bhattiprolu <sukadev at us.ibm.com>
Date:   Mon Oct 13 10:43:08 2008 +0100

    Simplify devpts_get_tty()

    As pointed out by H. Peter Anvin, since the inode for the pty is known,
    we don't need to look it up.

    Signed-off-by: Sukadev Bhattiprolu <sukadev at us.ibm.com>
    Signed-off-by: Alan Cox <alan at redhat.com>
    Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>


Bisection log:

git-bisect start
# good: [3fa8749e584b55f1180411ab1b51117190bac1e5] Linux 2.6.27
git-bisect good 3fa8749e584b55f1180411ab1b51117190bac1e5
# bad: [4a6908a3a050aacc9c3a2f36b276b46c0629ad91] Linux 2.6.28
git-bisect bad 4a6908a3a050aacc9c3a2f36b276b46c0629ad91
# bad: [c813b4e16ead3c3df98ac84419d4df2adf33fe01] Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
git-bisect bad c813b4e16ead3c3df98ac84419d4df2adf33fe01
# good: [8fa0b315fc0c1a414da1371f1fc39523a657c192] decnet: Fix compiler warning in dn_dev.c
git-bisect good 8fa0b315fc0c1a414da1371f1fc39523a657c192
# bad: [9c6102d446985bca9c426cb2d9b478ed21d2b024] ata: Add documentation for hard disk shock protection interface (v3)
git-bisect bad 9c6102d446985bca9c426cb2d9b478ed21d2b024
# good: [1a2217a9516b134e0a0e54cb4629e1e075d97b17] Merge git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6
git-bisect good 1a2217a9516b134e0a0e54cb4629e1e075d97b17
# good: [c00193f9f09f9b852249a66391985f585d066084] Merge branches 'oprofile-v2' and 'timers/hpet' into x86/core-v4
git-bisect good c00193f9f09f9b852249a66391985f585d066084
# bad: [20272c8994cf1e1f8ed745a2ea161dd9ad3889f2] Merge branch 'proc' of git://git.kernel.org/pub/scm/linux/kernel/git/adobriyan/proc
git-bisect bad 20272c8994cf1e1f8ed745a2ea161dd9ad3889f2
# bad: [8dff04ea316125639120c0a565ce0346b892fef7] pty: simplify unix98 allocation
git-bisect bad 8dff04ea316125639120c0a565ce0346b892fef7
# good: [9e48565d217a8a96cc7577308ad41e9e4b806a62] tty: Split tty_port into its own file
git-bisect good 9e48565d217a8a96cc7577308ad41e9e4b806a62
# good: [dbda4c0b97b18fd59b3964548361b4f92357f730] tty: Fix abusers of current->sighand->tty
git-bisect good dbda4c0b97b18fd59b3964548361b4f92357f730
# good: [73ec06fc5f5c8e1097a7a4a4ab2d7c6c3a007e81] tty: Finish fixing up the init_dev interface to use ERR_PTR
git-bisect good 73ec06fc5f5c8e1097a7a4a4ab2d7c6c3a007e81
# bad: [527b3e4773628b30d03323a2cb5fb0d84441990f] Simplify devpts_get_tty()
git-bisect bad 527b3e4773628b30d03323a2cb5fb0d84441990f
# bad: [4a2b5fddd53b80efcb3266ee36e23b8de28e761a] Move tty lookup/reopen to caller
git-bisect bad 4a2b5fddd53b80efcb3266ee36e23b8de28e761a
# good: [bf970ee46e0fb363c8df4393229121d54330a98e] tty: extract the pty init time special cases
git-bisect good bf970ee46e0fb363c8df4393229121d54330a98e




More information about the Containers mailing list