lkml.org 
[lkml]   [2000]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] potential NULL dereference in 2.4.0-test fs/pipe.c
Linus,

While studying fs/pipe.c's implementation of pipefs, I came across
an obvious potential NULL pointer dereference bug.
The patch below (against 2.4.0-test6) speaks for itself. Please apply.

/Mikael

--- linux-2.4.0-test6/fs/pipe.c.~1~ Fri Jul 14 18:22:10 2000
+++ linux-2.4.0-test6/fs/pipe.c Thu Aug 10 14:27:04 2000
@@ -545,9 +545,9 @@
this.len = strlen(name);
this.hash = inode->i_ino; /* will go */
dentry = d_alloc(pipe_mnt->mnt_sb->s_root, &this);
- dentry->d_op = &pipefs_dentry_operations;
if (!dentry)
goto close_f12_inode_i_j;
+ dentry->d_op = &pipefs_dentry_operations;
d_add(dentry, inode);
f1->f_vfsmnt = f2->f_vfsmnt = mntget(mntget(pipe_mnt));
f1->f_dentry = f2->f_dentry = dget(dentry);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:58    [W:0.030 / U:1.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site