Re: 2.6.16-mm1 leaks in dvb playback (found)

From: Adrian Bridgett
Date: Thu Mar 30 2006 - 17:55:42 EST


What I thought was just one patch was actually two and it was the
other patch causing the problem - "Do not lose accepted socket when
-ENFILE/-EMFILE".

Most of the patch seems to be just a restructuring - I guess that
leaves the sys_accept changes that are leaking the memory.

I've no idea how the code is supposed to work, so large rocks of salt
required :-) The code now does a sock_alloc_fd, and the error cases
now do a "put_filp" and "put_unused_fd" if the alloc succeeded.
However in the normal case, nothing gets freed (I guess that's the
memory leak). OTOH the description of the patch is:

"Try to allocate the struct file and an unused file
descriptor before we try to pull a newly accepted
socket out of the protocol layer."

http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=39d8c1b6fbaeb8d6adec4a8c08365cc9eaca6ae4

Cheers,

Adrian
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/