Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2967333yba; Mon, 8 Apr 2019 08:22:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqyNB+DTQgy/NEjl7D+zdV/GcGl5cyzODN3yV13UzANtP35nSRCLbu9Ja5Qwr9gv2JzgfP/A X-Received: by 2002:a63:5858:: with SMTP id i24mr28890944pgm.222.1554736955502; Mon, 08 Apr 2019 08:22:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554736955; cv=none; d=google.com; s=arc-20160816; b=sKQZXL+de+NsZvr+scKwEw9n5DHZxGChFzUIqIqd78qkKsm4cCsBO0yViIUwapikxw 1RVDXTN3GRj7dV+o/JYg9zC3oM8E6rMGvRFIZYSpMaGFw2y5+uTslZbT2hHwDcATNEMF tpAiUleG+zCO/ERbO3NPazkogMODbigqf86i44fIDsQ1xumyd2/bc0wb992kebJ1Q7w4 7sYfTpNrp3Z6duKbkvpWTIRSuWwPALUuGxqdoFqoWl1DSIXiLwVixnOKCadZ6g44BoHB +NxvKEx+x9ISzGrOqzvPCt8qT6JpQPEmfFsr9UTubJ9RUZO1Y7ptKR4SANO899qIRuvN kvBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:feedback-id:mime-version:user-agent :references:message-id:in-reply-to:subject:cc:to:from:date :dkim-signature; bh=CtKcuxRi7xBhOKcFdvYKUwz6gnLJDyf5JeeaCI9u4lU=; b=QrUxU1zF7bARtiFMZog9qKKFYOZ+u+QXfu0dzTHOqDNTrL6ZZc+6kRj/XgxCnDpPvy UEjU0RgyDRcQPj2UXAE+vOK0p+B7vGb6QDVD8mkaV+fNqpgrOqfDqPwsurm+XGSwl0nl fdBvBvUlQ1RRUI01G7bVJvCobGOBqpFr+VEg1d+nB2gJv3ze0VnVJzv+94u1hA8HbvUd zZEeujmpWIQSMaS7MDpK30nX5c1EtOxqq0YBU5XSOyL0pMdZcAAtyfjhceHd6UATEKVg nhUklBmxGxtx3eOD8PLNgFtga9ymQdi+cZhzMUjdyfUPpiaoDzpyr3NLTDk5v/ruBWRV 2C9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazonses.com header.s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw header.b=GvgiXh2j; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c142si28419424pfb.32.2019.04.08.08.22.17; Mon, 08 Apr 2019 08:22:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amazonses.com header.s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw header.b=GvgiXh2j; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728767AbfDHPPO (ORCPT + 99 others); Mon, 8 Apr 2019 11:15:14 -0400 Received: from a9-37.smtp-out.amazonses.com ([54.240.9.37]:46396 "EHLO a9-37.smtp-out.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728479AbfDHPPN (ORCPT ); Mon, 8 Apr 2019 11:15:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=6gbrjpgwjskckoa6a5zn6fwqkn67xbtw; d=amazonses.com; t=1554736511; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:MIME-Version:Content-Type:Feedback-ID; bh=lNudCzZ4w2s8/H8+lpBX7L/o8a8N/r9Gfx4wno1thXs=; b=GvgiXh2jwzAKEcSIvSEHZ7wXwO53kEXUrIQ32sBEP9JQ5xZuwvt2G2bVkMYkRab/ s8KivUTDhpY3S/pzO5O2k7tEkQI0ZyRGpdsqWx71a9wJfL775CkbpHGn71j6vP8XsjD q7weJEid6EUbqwZjDvHiR2VVskTLBYw+21QKoko0= Date: Mon, 8 Apr 2019 15:15:11 +0000 From: Christopher Lameter X-X-Sender: cl@nuc-kabylake To: Linus Torvalds cc: Qian Cai , Andrew Morton , penberg@kernel.org, David Rientjes , iamjoonsoo.kim@lge.com, Tejun Heo , Linux-MM , Linux List Kernel Mailing Subject: Re: [PATCH] slab: fix a crash by reading /proc/slab_allocators In-Reply-To: Message-ID: <01000169fd847a25-5933cc1e-a520-416a-b634-84b3e7ce9960-000000@email.amazonses.com> References: <20190406225901.35465-1-cai@lca.pw> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-SES-Outgoing: 2019.04.08-54.240.9.37 Feedback-ID: 1.us-east-1.fQZZZ0Xtj2+TD7V5apTT/NrT6QKuPgzCT/IC7XYgDKI=:AmazonSES Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 7 Apr 2019, Linus Torvalds wrote: > On Sat, Apr 6, 2019 at 12:59 PM Qian Cai wrote: > > > > The commit 510ded33e075 ("slab: implement slab_root_caches list") > > changes the name of the list node within "struct kmem_cache" from > > "list" to "root_caches_node", but leaks_show() still use the "list" > > which causes a crash when reading /proc/slab_allocators. > > The patch does seem to be correct, and I have applied it. > > However, it does strike me that apparently this wasn't caught for two > years. Which makes me wonder whether we should (once again) discuss > just removing SLAB entirely, or at least removing the > /proc/slab_allocators file. Apparently it has never been used in the > last two years. At some point a "this can't have worked if anybody > ever tried to use it" situation means that the code should likely be > excised. This is only occurring with specially build kernels so that memory leaks can be investigated. The same is done with other tools (kasan and friends) today I guess and also the SLUB debugging tools are much more user friendly. So this means that some esoteric debugging feature of SLAB was broken.