Re: BUG in tty_open when using containers and ptrace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On śro, lip 22, 2009 at 06:48:55 -0700, H. Peter Anvin wrote:> > | Bisecting...
2.6.27 is good, 2.6.28 is bad. Some 600-odd revisions still to go (willcontinue in the evening).
> Interesting... I have to say I'm more than a bit surprised that you can> mount a filesystem on top of a character device node at all, but there> isn't really a fundamental reason why you couldn't do it, so...
Actually it's mounting a device node over a device node. I was reallysurprised when I learnt that you can mount --bind other things thandirectories but thought it could be the closest a container can get to areal console. So mounting /dev/pts/0 over /dev/console seemed quitenatural to me.
> I am assuming that what causes the problem is that you have found a way> (vfsmount) to hold the pts device node busy which doesn't involve the> tty subsystem.  This isn't inherently a problem, but it does have> implications for freeing: in particular, the pts node cannot be removed> until the vfsmount is gone, *and* the device number cannot be reclaimed.>  It sounds like it's the latter piece which causes problems.
Upthread I posted a patch[1] that makes tty_driver_lookup_tty() returnNULL (later changed to ERR_PTR(-EIO) and verified it works) in such acase. If the inode can (as you say) legally outlive its matching tty_struct,I guess the patch should go in. If it cannot, well, the patch is bogus.
Best regards, Grzegorz Nosek
[1] https://lists.linux-foundation.org/pipermail/containers/2009-July/019141.html_______________________________________________Containers mailing listContainers@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx://lists.linux-foundation.org/mailman/listinfo/containers


[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux