On Sun, Jan 09, 2011 at 03:18:56PM +0100, maximilian attems wrote: > Seen in RH 2.6.32, applies fine to latest Debian 2.6.32. > Please consider for longterm 2.6.32, 2.6.33 and 2.6.34. > (it got shipped with 2.6.35)
Agreed that this patch would make sense for stable branches as well. --b. > > thank you. > > ----- Forwarded message from Linux Kernel Mailing List > <[email protected]> ----- > > Date: Thu, 20 May 2010 01:00:47 GMT > From: Linux Kernel Mailing List <[email protected]> > To: [email protected] > Subject: sunrpc/cache: fix module refcnt leak in a failure path > > Gitweb: > http://git.kernel.org/linus/a5990ea1254cd186b38744507aeec3136a0c1c95 > Commit: a5990ea1254cd186b38744507aeec3136a0c1c95 > Parent: 91885258e8343bb65c08f668d7e6c16563eb4284 > Author: Li Zefan <[email protected]> > AuthorDate: Thu Mar 11 14:08:10 2010 -0800 > Committer: J. Bruce Fields <[email protected]> > CommitDate: Wed Mar 24 10:40:46 2010 -0400 > > sunrpc/cache: fix module refcnt leak in a failure path > > Don't forget to release the module refcnt if seq_open() returns failure. > > Signed-off-by: Li Zefan <[email protected]> > Cc: J. Bruce Fields <[email protected]> > Cc: Neil Brown <[email protected]> > Cc: Trond Myklebust <[email protected]> > Signed-off-by: Andrew Morton <[email protected]> > Signed-off-by: J. Bruce Fields <[email protected]> > --- > net/sunrpc/cache.c | 4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > > diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c > index 3e1ef8b..a3f340c 100644 > --- a/net/sunrpc/cache.c > +++ b/net/sunrpc/cache.c > @@ -1244,8 +1244,10 @@ static int content_open(struct inode *inode, struct > file *file, > if (!cd || !try_module_get(cd->owner)) > return -EACCES; > han = __seq_open_private(file, &cache_content_op, sizeof(*han)); > - if (han == NULL) > + if (han == NULL) { > + module_put(cd->owner); > return -ENOMEM; > + } > > han->cd = cd; > return 0; > -- > To unsubscribe from this list: send the line "unsubscribe git-commits-head" in > the body of a message to [email protected] > More majordomo info at http://vger.kernel.org/majordomo-info.html > > ----- End forwarded message ----- > _______________________________________________ stable mailing list [email protected] http://linux.kernel.org/mailman/listinfo/stable
