lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200806301811.m5UIBchl030097@agora.fsl.cs.sunysb.edu>
Date:	Mon, 30 Jun 2008 14:11:38 -0400
From:	Erez Zadok <ezk@...sunysb.edu>
To:	Hugh Dickins <hugh@...itas.com>
Cc:	Erez Zadok <ezk@...sunysb.edu>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] unionfs: fix memory leak 

In message <Pine.LNX.4.64.0806290105430.20280@...nde.site>, Hugh Dickins writes:
> Unionfs has slowly been leaking memory: although many places do explicitly
> free the dentry's lower_paths array (and I've not changed those, in case
> the ordering is important), not all do - and adding a WARN_ON didn't seem
> to finger any particular culprit.  So free_dentry_private_data needs to
> kfree lower_paths (other freeers are good about setting it to NULL).
> 
> Signed-off-by: Hugh Dickins <hugh@...itas.com>
> ---
> Should follow mmotm's git-unionfs-fixup.patch
> 
>  fs/unionfs/lookup.c |    1 +
>  1 file changed, 1 insertion(+)
>  
> --- mmotm/fs/unionfs/lookup.c	2008-06-27 13:39:18.000000000 +0100
> +++ linux/fs/unionfs/lookup.c	2008-06-27 14:08:00.000000000 +0100
> @@ -498,6 +498,7 @@ void free_dentry_private_data(struct den
>  {
>  	if (!dentry || !dentry->d_fsdata)
>  		return;
> +	kfree(UNIONFS_D(dentry)->lower_paths);
>  	kmem_cache_free(unionfs_dentry_cachep, dentry->d_fsdata);
>  	dentry->d_fsdata = NULL;
>  }


Thanks, I'll take a closer look at this to ensure that all paths kfree
lower_paths as needed.

Erez.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ