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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
> ---
> 
>  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;
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux