Re: [git pull] single_open() leak fixes

From: Roland Eggner
Date: Sun May 05 2013 - 10:28:27 EST


On 2013-05-05 Sunday at 06:54 +0100 Al Viro wrote:
> A bunch of fixes for a moderately common class of bugs: file with
> single_open() done by its ->open() and seq_release as its ->release().
> That leaks; fortunately, it's not _too_ common (either people manage to
> RTFM that says "When using single_open(), the programmer should use
> single_release() instead of seq_release() in the file_operations structure
> to avoid a memory leak", or they just copy a correct instance), but grepping
> through the tree has caught quite a pile. All of that is, AFAICS, -stable
> fodder, for as far as the patches apply. â â

Some 40 memory leaks plugged at once â quite elegant :)

Additionally maybe your cunning grep commands are checkpatch.pl fodder?
At patch level risk of false warnings probably would be lower than at C code
level.

--
Regards
Roland Eggner

Attachment: pgp00000.pgp
Description: PGP signature