lkml.org 
[lkml]   [1997]   [Jul]   [28]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
FromAndreas Schwab <>
DateMon, 28 Jul 97 11:01:25 +0200
Subjectdcache reference leak in 2.1.47
When sys_symlink fails with EEXIST it leaks a reference on the dentry for
the new name.

--- linux-2.1.47/fs/namei.c.~11~	Fri Jul 25 21:13:39 1997
+++ linux-2.1.47/fs/namei.c	Sat Jul 26 13:24:04 1997
@@ -904,7 +904,7 @@
 
 	error = -EEXIST;
 	if (dentry->d_inode)
-		goto exit;
+		goto exit_dput;
 
 	dir = lock_parent(dentry);
 
@@ -926,6 +926,7 @@
 
 exit_lock:
 	up(&dir->i_sem);
+exit_dput:
 	dput(dentry);
 exit:
 	return error;
-- 
Andreas Schwab                                      "And now for something
schwab@issan.informatik.uni-dortmund.de              completely different"

\
 
 \ /
  Last update: 2005-03-22 13:40    [from the cache]
©2003-2008