Re: [PATCH 10/12] sunrpc: fix memory leak in unix_gid cache.

J. Bruce Fields
2009-08-04T20:55:54Z

On Tue, Aug 04, 2009 at 03:22:39PM +1000, NeilBrown wrote:
> When we look up an entry in the uid->gidlist cache, we take
> a reference to the content but don't drop the reference to the
> cache entry. So it never gets freed.

Applied, thanks. (It doesn't seem to depend on the others.)

--b.

>
> Signed-off-by: NeilBrown <neilb@suse.de>
> ---
>
> net/sunrpc/svcauth_unix.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c
> index f2de152..0afeb30 100644
> --- a/net/sunrpc/svcauth_unix.c
> +++ b/net/sunrpc/svcauth_unix.c
> @@ -660,6 +660,7 @@ static int unix_gid_find(uid_t uid, struct group_info **gip,
> case 0:
> *gip = ug->gi;
> get_group_info(*gip);
> + cache_put(&ug->h, &unix_gid_cache);
> return 0;
> case -ETIMEDOUT:
> prevug = ug;
>
>