Re: [git pull] single_open() leak fixes

Roland Eggner
2013-05-05T14:28:07Z

[-- Attachment #1: Type: text/plain, Size: 885 bytes --]

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 #2: Type: application/pgp-signature, Size: 198 bytes --]