[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190813093512.GE62772@arrakis.emea.arm.com>
Date: Tue, 13 Aug 2019 10:35:12 +0100
From: Catalin Marinas <catalin.marinas@....com>
To: linux-mm@...ck.org
Cc: linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Michal Hocko <mhocko@...nel.org>,
Matthew Wilcox <willy@...radead.org>, Qian Cai <cai@....pw>
Subject: Re: [PATCH v3 3/3] mm: kmemleak: Use the memory pool for early
allocations
On Mon, Aug 12, 2019 at 05:06:42PM +0100, Catalin Marinas wrote:
> @@ -466,9 +419,13 @@ static struct kmemleak_object *mem_pool_alloc(gfp_t gfp)
> struct kmemleak_object *object;
>
> /* try the slab allocator first */
> - object = kmem_cache_alloc(object_cache, gfp_kmemleak_mask(gfp));
> - if (object)
> - return object;
> + if (object_cache) {
> + object = kmem_cache_alloc(object_cache, gfp_kmemleak_mask(gfp));
> + if (object)
> + return object;
> + else
> + WARN_ON_ONCE(1);
Oops, this was actually my debug warning just to make sure it triggered
(tested with failslab). The WARN_ON_ONCE(1) should be removed (I changed
it locally in case I post an update).
I noticed it in Andrew's subsequent checkpatch fix.
--
Catalin
Powered by blists - more mailing lists