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] [day] [month] [year] [list]
Message-ID: <84144f020811201045w27d4d751h771276eb5fd8beda@mail.gmail.com>
Date:	Thu, 20 Nov 2008 20:45:19 +0200
From:	"Pekka Enberg" <penberg@...helsinki.fi>
To:	"Catalin Marinas" <catalin.marinas@....com>
Cc:	"Christoph Lameter" <cl@...ux-foundation.org>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	"Arnaldo Carvalho de Melo" <acme@...stprotocols.net>
Subject: Re: Possible memory leak via slub kmem_cache_create

Hi Catalin,

On Thu, Nov 20, 2008 at 11:51 AM, Catalin Marinas
<catalin.marinas@....com> wrote:
> My point is that the API is slightly different when slub is used since
> kmem_cache_name is no longer guaranteed to return the same pointer
> passed to kmem_cache_create. Maybe a documentation update:
>
> diff --git a/mm/slab.c b/mm/slab.c
> index ea76bcb..9723a72 100644
> --- a/mm/slab.c
> +++ b/mm/slab.c
> @@ -2124,6 +2124,8 @@ static int __init_refok setup_cpu_cache(struct kmem_cache
>  *
>  * @name must be valid until the cache is destroyed. This implies that
>  * the module calling this has to destroy the cache before getting unloaded.
> + * Note that kmem_cache_name() is not guaranteed to return the same pointer,
> + * therefore applications must manage it themselves.

Yes, makes sense. Care to send a patch I can apply?

                         Pekka
--
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