LWN.net Logo

Detecting kernel memory leaks

Detecting kernel memory leaks

Posted Jun 24, 2006 11:59 UTC (Sat) by nix (subscriber, #2304)
In reply to: Detecting kernel memory leaks by cpeterso
Parent article: Detecting kernel memory leaks

net/unix/garbage.c already contains a mark-and-sweep garbage collector: garbage collection is a requirement for AF_UNIX socket handling unless you like DoSes (which are easy: a program sets up an AF_UNIX socket, opens it itself but does not go into accept(), sends the socket's filehandle along the socket, closes both ends, and quits. Oops. One handle leaked, unless you detect the filehandles in transit along the the AF_UNIX socket, which means mark-and-sweep collection given that these fhes may be the fhes of other sockets which may themselves have filehandles in transit along them...)


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds