rpms/kernel/FC-4 linux-2.6-dcache-inode-leak.patch, NONE, 1.1 kernel-2.6.spec, 1.1577, 1.1578
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Tue Jan 24 20:06:17 UTC 2006
Author: davej
Update of /cvs/dist/rpms/kernel/FC-4
In directory cvs.devel.redhat.com:/tmp/cvs-serv2825
Modified Files:
kernel-2.6.spec
Added Files:
linux-2.6-dcache-inode-leak.patch
Log Message:
Fix inode leak in d_instantiate_unique()
linux-2.6-dcache-inode-leak.patch:
dcache.c | 1 +
1 files changed, 1 insertion(+)
--- NEW FILE linux-2.6-dcache-inode-leak.patch ---
Searching for inode leakage in NFS code (seen in 2.6.14 and 2.6.15 at least,
have not tried earlier versions), I see suspicious place in
d_instantiate_unique (the only user happens to be NFS).
There if we have found aliased dentry that we return, inode reference is
not dropped and inode is not attached anywhere, so it seems the reference
to inode is leaked in that case.
This simple patch below fixes the problem. Unfortunatelly the leakage seems
to be non-100% in my testing, so I will continue the testing to see
if I still see inodes to leak or not (no leak seen so far with the patch).
--- linux-2.6.15/fs/dcache.c~ 2006-01-24 15:02:52.000000000 -0500
+++ linux-2.6.15/fs/dcache.c 2006-01-24 15:04:00.000000000 -0500
@@ -843,6 +843,7 @@ struct dentry *d_instantiate_unique(stru
dget_locked(alias);
spin_unlock(&dcache_lock);
BUG_ON(!d_unhashed(alias));
+ iput(inode);
return alias;
}
list_add(&entry->d_alias, &inode->i_dentry);
Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/kernel-2.6.spec,v
retrieving revision 1.1577
retrieving revision 1.1578
diff -u -r1.1577 -r1.1578
--- kernel-2.6.spec 24 Jan 2006 19:57:49 -0000 1.1577
+++ kernel-2.6.spec 24 Jan 2006 20:06:12 -0000 1.1578
@@ -353,6 +353,7 @@
Patch1860: linux-2.6-posix-timers-sched_time-accumulation.patch
Patch1870: linux-2.6-kill-blk_attempt_merge.patch
Patch1880: linux-2.6-i2c-it87-reboot.patch
+Patch1890: linux-2.6-dcache-inode-leak.patch
# Warn about usage of various obsolete functionality that may go away.
Patch1900: linux-2.6-obsolete-idescsi-warning.patch
@@ -794,6 +795,8 @@
%patch1870 -p1
# Some it87 probing causes reboots on some systems.
%patch1880 -p1
+# Fix inode leak in d_instantiate_unique
+%patch1890 -p1
# Warn about obsolete functionality usage.
%patch1900 -p1
@@ -1272,6 +1275,7 @@
%changelog
* Tue Jan 24 2006 Dave Jones <davej at redhat.com> [2.6.15-1.1825_FC4]
- Fix it87 probing problem which caused reboots on some hardware.
+- Fix inode leak in d_instantiate_unique()
* Sun Jan 15 2006 Dave Jones <davej at redhat.com>
- 2.6.15.1
More information about the fedora-cvs-commits
mailing list