[Devel] Re: BUG in tty_open when using containers and ptrace

Sukadev Bhattiprolu sukadev at linux.vnet.ibm.com
Thu Jul 23 12:32:45 PDT 2009


Grzegorz Nosek [root at localdomain.pl] wrote:
| 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.
| 

Yes, I think this was fixed by 808ffa3d302257b9dc37b1412c1fcdf976fcddac

| 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>

Maybe before returning the tty, we need to take an extra reference on
the dentry.

Sukadev

_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list