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: <20120418152947.GA8794@swordfish.minsk.epam.com>
Date:	Wed, 18 Apr 2012 18:29:48 +0300
From:	Sergey Senozhatsky <sergey.senozhatsky@...il.com>
To:	Catalin Marinas <catalin.marinas@....com>
Cc:	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] kmemleak: do not leak object after tree insertion error
 (v2, fixed)

On (04/18/12 15:40), Catalin Marinas wrote:
> On Tue, Apr 03, 2012 at 12:06:56AM +0100, Sergey Senozhatsky wrote:
> > [PATCH] kmemleak: do not leak object after tree insertion error
> > 
> > In case when tree insertion fails due to already existing object
> > error, pointer to allocated object gets lost due to lookup_object()
> > overwrite. Free allocated object and return the existing one, 
> > obtained from lookup_object().
> 
> We really need to return NULL if the tree insertion fails as kmemleak is
> disabled in this case (fatal condition for kmemleak). So we could just
> call kmem_cache_free(object_cache, object) in the 'if' block.
> 

Good point. Thanks a lot for your review!
I was chasing two bugs and sort of messed things up. I'll send v3 shortly.


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