Messages in this thread Patch in this message | | | Date | Tue, 12 Aug 1997 12:15:23 -0400 | From | Bill Hawes <> | Subject | minor patch for 2.1.49 fs/pipe.c |
| |
Attached is a patch to test a memory allocation in fs/pipe.c.
The kernel list has been very quiet wrt bug reports -- hopefully all the dentry oopses are fixed now.
Regards, Bill--- fs/pipe.c.old Tue Aug 12 07:45:37 1997 +++ fs/pipe.c Tue Aug 12 09:06:25 1997 @@ -462,7 +464,11 @@ goto close_f12_inode_i; j = error; - f1->f_dentry = f2->f_dentry = dget(d_alloc_root(inode, NULL)); + error = -ENOMEM; + f1->f_dentry = d_alloc_root(inode, NULL); + if (!f1->f_dentry) + goto close_f12_inode_i_j; + f2->f_dentry = dget(f1->f_dentry); /* read file */ f1->f_pos = f2->f_pos = 0; @@ -480,6 +486,8 @@ fd[1] = j; return 0; +close_f12_inode_i_j: + put_unused_fd(j); close_f12_inode_i: put_unused_fd(i); close_f12_inode: | |