lkml.org 
[lkml]   [1997]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: Bug report: leak in isdn/module related part
From
Date

[...]

I could reproduce the leakage with your script (sent to me by private
email). When you delete the routes for a device, the struct fib_info
is taken out of the list when the ref count goes to zero but the
memory isn't returned. The patch is against 2.0.29.

--------------------------------------------------------------------
diff -u --recursive linux-2.0.orig/net/ipv4/route.c linux-2.0/net/ipv4/route.c
--- linux-2.0.orig/net/ipv4/route.c Fri Jul 5 10:58:35 1996
+++ linux-2.0/net/ipv4/route.c Wed Apr 2 23:43:15 1997
@@ -203,6 +203,7 @@
fi->fib_prev->fib_next = fi->fib_next;
if (fi == fib_info_list)
fib_info_list = fi->fib_next;
+ kfree_s(fi,sizeof(struct fib_info));
}
kfree_s(f, sizeof(struct fib_node));
}
--------------------------------------------------------------------
PS: I found the leak with my leak-finder kernel patches, posted to
linux-kernel some days ago (couldn't resist advertising :-))

ciao

Andreas

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