summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-kernel/uclinux-sources/files/uclinux-sources-2.6.devPtmx.patch')
-rw-r--r--sys-kernel/uclinux-sources/files/uclinux-sources-2.6.devPtmx.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/sys-kernel/uclinux-sources/files/uclinux-sources-2.6.devPtmx.patch b/sys-kernel/uclinux-sources/files/uclinux-sources-2.6.devPtmx.patch
new file mode 100644
index 000000000000..2312a2bf5e3b
--- /dev/null
+++ b/sys-kernel/uclinux-sources/files/uclinux-sources-2.6.devPtmx.patch
@@ -0,0 +1,21 @@
+Index: linux-2.6.5/fs/devpts/inode.c
+===================================================================
+--- linux-2.6.5.orig/fs/devpts/inode.c
++++ linux-2.6.5/fs/devpts/inode.c
+@@ -178,9 +178,13 @@ struct tty_struct *devpts_get_tty(int nu
+ {
+ struct dentry *dentry = get_node(number);
+ struct tty_struct *tty;
+-
+- tty = (IS_ERR(dentry) || !dentry->d_inode) ? NULL :
+- dentry->d_inode->u.generic_ip;
++
++ tty = NULL;
++ if (!IS_ERR(dentry)) {
++ if (dentry->d_inode)
++ tty = dentry->d_inode->u.generic_ip;
++ dput(dentry);
++ }
+
+ up(&devpts_root->d_inode->i_sem);
+