Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2853819imm; Sun, 30 Sep 2018 06:24:19 -0700 (PDT) X-Google-Smtp-Source: ACcGV62s/YoycwDZs0G/fowkAYUnA/hfRWYGB0fKpMeAbP2f8GHy4L2V1kBaZYXQONYYF1KCRRMn X-Received: by 2002:a62:9554:: with SMTP id p81-v6mr7059705pfd.222.1538313859063; Sun, 30 Sep 2018 06:24:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538313858; cv=none; d=google.com; s=arc-20160816; b=Vx4E1H47npNd8LRyDCOIoa3pFVvT7U0c8nYJGdS2Z4d/TQjSdMxPjGiRit4ygEwzvm rfjHIszGj2aod8YJVwUvXApKY9sQwNO8xvRJ0/32tvSZ8365Blbmq9fxd7Z3NZvnD5Gf JVDTYQZjO8ujVgXhvgQgmMsPA9bARNfk8OEGEqmCHY/eEszY3NRL7GhQprA9u5oLRurt T+f/z8RY1Rxv2rFzaxKUBzTKL31ZI5jS17KwmjQ2BNfmgIvc607Q8ncR2wH2WzuwuARC 2RKZiKzkvwU0KMgALhjBMoRCNN04vthqlKZ9FIjB4kkiMM6dqAbFN+H6D6hHqScEifZF n/wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=LA3wp2p9sTmjk5CKex50fKXJR9gaR9FgWxcIJ+QlSho=; b=ojTDrJc3aLGo/NDD3+PeGZ/RMEfu9g+0O8/jx5i1PaqRlMf9EDUtxUgmvA9K31ZUcD uMHF1VKMUlol92SF9EHW03w4lR6ESbfOoU9xDnzra3nandgKWNI/NUqgpHc+CiqCx0gb fWcvp9hrMEhGlCsJwczfRBxD4z8nl/Q7XUe/ur8RBWdKrmkysPpUemRldYJI+BzF/VRj iWQRSKFm4PIcHNWOT5jnRtISkAmxmME3+bbaPg2R8CUzlj7cAkBsN2eZjcjvfj6VKEN4 ENJX79ldPAmxLf28ccqaDBqAxa7cuXo4/VOSsZKXDk3cUFYlmRRVlyVhoSol+cyfwiFV U/MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=DbwemmyL; 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 e10-v6si9686923pgl.554.2018.09.30.06.23.49; Sun, 30 Sep 2018 06:24:18 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=DbwemmyL; 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 S1728361AbeI3T4q (ORCPT + 99 others); Sun, 30 Sep 2018 15:56:46 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:40846 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728187AbeI3T4q (ORCPT ); Sun, 30 Sep 2018 15:56:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=LA3wp2p9sTmjk5CKex50fKXJR9gaR9FgWxcIJ+QlSho=; b=DbwemmyL72toc+Dxr4jqsHzNZ AuZx/76tVSdFft1/rHMHA4/Mb39lCRBq2kohS6D5MCkOuaa2UVUSgga3TyWCtPh2X70oeEQ6CbIyD oiYyd78LnOazlygB+R+L4GWixqajnrLuiEHxjqqjYH0ex4PmGWlzdz0yWpGxQgikJ1X2QzQx3rESQ O4JGDxEveq4m2snjN8CxeNogbUp5+Gys3bdKXldtjTL5SJ0MX79p6TqExDxpZ2Xh0i3gVU6weAytz qh0bmiy74nyT+kQ03UuPpBQgeJktbHTMa9SSDmMo2GwuzTmrgN9H+DJbh7B/dJ46/BS1V9Aj2A1OK uwh+8M5VQ==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1g6bh7-0002vH-DL; Sun, 30 Sep 2018 13:23:33 +0000 Date: Sun, 30 Sep 2018 06:23:33 -0700 From: Matthew Wilcox To: Greg KH Cc: zhong jiang , cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, mhocko@kernel.org, mgorman@suse.de, vbabka@suse.cz, andrea@kernel.org, kirill@shutemov.name, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [STABLE PATCH] slub: make ->cpu_partial unsigned int Message-ID: <20180930132333.GA10872@bombadil.infradead.org> References: <1538303301-61784-1-git-send-email-zhongjiang@huawei.com> <20180930125038.GA2533@bombadil.infradead.org> <20180930131026.GA25677@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180930131026.GA25677@kroah.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Sep 30, 2018 at 06:10:26AM -0700, Greg KH wrote: > On Sun, Sep 30, 2018 at 05:50:38AM -0700, Matthew Wilcox wrote: > > On Sun, Sep 30, 2018 at 06:28:21PM +0800, zhong jiang wrote: > > > From: Alexey Dobriyan > > > > > > [ Upstream commit e5d9998f3e09359b372a037a6ac55ba235d95d57 ] > > > > > > /* > > > * cpu_partial determined the maximum number of objects > > > * kept in the per cpu partial lists of a processor. > > > */ > > > > > > Can't be negative. > > > > > > I hit a real issue that it will result in a large number of memory leak. > > > Becuase Freeing slabs are in interrupt context. So it can trigger this issue. > > > put_cpu_partial can be interrupted more than once. > > > due to a union struct of lru and pobjects in struct page, when other core handles > > > page->lru list, for eaxmple, remove_partial in freeing slab code flow, It will > > > result in pobjects being a negative value(0xdead0000). Therefore, a large number > > > of slabs will be added to per_cpu partial list. > > > > > > I had posted the issue to community before. The detailed issue description is as follows. > > > > > > https://www.spinics.net/lists/kernel/msg2870979.html > > > > > > After applying the patch, The issue is fixed. So the patch is a effective bugfix. > > > It should go into stable. > > > > > > Link: http://lkml.kernel.org/r/20180305200730.15812-15-adobriyan@gmail.com > > > Signed-off-by: Alexey Dobriyan > > > Acked-by: Christoph Lameter > > > > Hang on. Christoph acked the _original_ patch going into upstream. > > When he reviewed this patch for _stable_ last week, he asked for more > > investigation. Including this patch in stable is misleading. > > But the original patch has been in upstream for a long time now (it went > into 4.17-rc1). If there was a real problem here, whouldn't it have > been resolved already? > > And the patch in mainline has Christoph's ack... I'm not saying there's a problem with the patch. It's that the rationale for backporting doesn't make any damned sense. There's something going on that nobody understands. This patch is probably masking an underlying problem that will pop back up and bite us again someday.