lkml.org 
[lkml]   [1997]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectminor 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:
\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.021 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site