[Devel] Re: BUG in tty_open when using containers and ptrace
Sukadev Bhattiprolu
sukadev at linux.vnet.ibm.com
Thu Jul 30 11:44:20 PDT 2009
Sukadev Bhattiprolu [sukadev at linux.vnet.ibm.com] wrote:
| Index: linux-2.6.30/fs/devpts/inode.c
| ===================================================================
| --- linux-2.6.30.orig/fs/devpts/inode.c 2009-07-30 10:48:17.000000000 -0400
| +++ linux-2.6.30/fs/devpts/inode.c 2009-07-30 10:58:37.000000000 -0400
| @@ -519,8 +519,14 @@
|
| struct tty_struct *devpts_get_tty(struct inode *pts_inode, int number)
| {
| + struct dentry *dentry;
| +
| BUG_ON(pts_inode->i_rdev == MKDEV(TTYAUX_MAJOR, PTMX_MINOR));
|
| + dentry = d_find_alias(pts_inode);
| + if (IS_ERR(dentry))
Sorry, this should be:
if (!dentry)
| + return NULL;
| +
| if (pts_inode->i_sb->s_magic == DEVPTS_SUPER_MAGIC)
| return (struct tty_struct *)pts_inode->i_private;
| return NULL;
|
| _______________________________________________
| Containers mailing list
| Containers at lists.linux-foundation.org
| https://lists.linux-foundation.org/mailman/listinfo/containers
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list