From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt0-f198.google.com (mail-qt0-f198.google.com [209.85.216.198]) by kanga.kvack.org (Postfix) with ESMTP id 7F0526B0005 for ; Tue, 19 Jun 2018 16:17:39 -0400 (EDT) Received: by mail-qt0-f198.google.com with SMTP id c1-v6so762504qtj.6 for ; Tue, 19 Jun 2018 13:17:39 -0700 (PDT) Received: from frisell.zx2c4.com (frisell.zx2c4.com. [192.95.5.64]) by mx.google.com with ESMTPS id 14-v6si575553qkf.324.2018.06.19.13.17.38 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Jun 2018 13:17:38 -0700 (PDT) Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTP id aa5bcfbd for ; Tue, 19 Jun 2018 20:11:43 +0000 (UTC) Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 734f4933 (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128:NO) for ; Tue, 19 Jun 2018 20:11:42 +0000 (UTC) Received: by mail-ot0-f182.google.com with SMTP id 101-v6so1145982oth.4 for ; Tue, 19 Jun 2018 13:17:37 -0700 (PDT) MIME-Version: 1.0 References: <46ca5661-4bd1-6733-0140-d6e6dea1ab33@virtuozzo.com> In-Reply-To: <46ca5661-4bd1-6733-0140-d6e6dea1ab33@virtuozzo.com> From: "Jason A. Donenfeld" Date: Tue, 19 Jun 2018 22:17:25 +0200 Message-ID: Subject: Re: Possible regression in "slab, slub: skip unnecessary kasan_cache_shutdown()" Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-mm@kvack.org List-ID: To: aryabinin@virtuozzo.com Cc: Alexander Potapenko , Dmitry Vyukov , cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, Andrew Morton , kasan-dev@googlegroups.com, Linux-MM , LKML , Shakeel Butt Hi Andrey, On Tue, Jun 19, 2018 at 7:33 PM Andrey Ryabinin wrote: > What's the status of CONFIG_SLUB_DEBUG in your config? > > AFAICS __kmem_cache_empty() is broken for CONFIG_SLUB_DEBUG=n. We use slabs_node() there > which is always 0 for CONFIG_SLUB_DEBUG=n. > > The problem seems not limited to __kmem_cache_empty(), __kmem_cache_shutdown() and __kmem_cache_shrink() > are also rely on correctness of the slabs_node(). Presumably this might cause some problems while > destroying memcg kmem caches. CONFIG_SLUB_DEBUG is not set in the crash I sent. Enabling it "fixes" the problem! This either means that KASAN+SLUB should enable SLUB_DEBUG, or the extra overhead from SLUB_DEBUG is just making the bug more rare but not actually eliminating it. Jason