Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2191633imm; Thu, 27 Sep 2018 08:49:02 -0700 (PDT) X-Google-Smtp-Source: ACcGV6171ugT3pVTNiYDypmajc8gAPdzUswbSPDMh1s+FoRSrA9GPTLBBWIcsaq0jNXbMQl8q6Gy X-Received: by 2002:a65:5245:: with SMTP id q5-v6mr10699753pgp.67.1538063342595; Thu, 27 Sep 2018 08:49:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538063342; cv=none; d=google.com; s=arc-20160816; b=Kbov5uoyImwuvZJzsULo01y+Fch8nQJiupTaE7k3Bkx0rfctlWcjPSceyYdYAaD6JU tYSYBuCiWbvKIgetarqU8sy3snwryJB5l48+VatmCJ+DF6wJeJ1v3tpp44e1/5cODiKC Oicxj0h+wvJmI0qK3oxP/alUF2HK5JGvUdl/rWPEnn0QRVv0U5QZHrkJBCYmvf1QxBgs NeV8jq1LREDpkR+UAPSIHtagdZR6xkTAA+IYRBFKboE6yAv+FJiuclClkSE91w19SzTI 4MAOL4b+lgH6UlbfimrHfKlOFWTq7QO1m3mFJAUMTqOWvgmEzsptagsggF5MlnE4G5/V H4xA== 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=Gqsod2o5Yv4m1Ls7P5JWePrCuv80qQDPWX0bJi04T1I=; b=NAFtHtNfClQ9rOMHI1HDDRI9RdJj8aLN5iaMzkwgioiIkqhtxyg236qvQO4zXUP7SG y5QRJ43WWs7DJHuoiUAay7gWGFbcLWUlGz5c8/P7jlNEyWfXaImV/Dhjeb/yDqCgrxwT IcGizMHcJZMcXdPKGnfVmFEkEqOHTbMkyYfv+FQjLBG8Jp2OcSCwL5JSH0Rmo3gVHXpR GAdhzZmn6r3jY4cu7aN+7m+fC6MLVn6H90JyNWVfuuGITaOJLClzT4hNlkIpbXyaN1/I mPQD3zoyw1vkWYcoqO+XgWOZ36g1KvYKKDGAeZe0C4caI8iYDQQonTpIBtsjUSSaydIy QQDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=NYBjBqQQ; 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 g7-v6si2237862plt.259.2018.09.27.08.48.46; Thu, 27 Sep 2018 08:49:02 -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=@messagingengine.com header.s=fm3 header.b=NYBjBqQQ; 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 S1728120AbeI0WFn (ORCPT + 99 others); Thu, 27 Sep 2018 18:05:43 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:33641 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727270AbeI0WFn (ORCPT ); Thu, 27 Sep 2018 18:05:43 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 01FCD21E81; Thu, 27 Sep 2018 11:46:51 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 27 Sep 2018 11:46:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=Gqsod2o5Yv4m1Ls7P5JWePrCuv80q QDPWX0bJi04T1I=; b=NYBjBqQQ+5CIyf5gjeoQKs1oqdd6+N1CxVUKd/mZnaGq4 sf672WdiIKsqVD2L32D7PsmoCfN1ALucngZbEJzU+uM65xOfSxMoW6R6GK/lrEEm isxoGhuIcJ8GVAqZDXUmxYVt/lEO+4nF1Kjv7SaFM+im0rThJrq16fI+zDBL5e/g 0ljvzoXEoLaK6LrSNx/YmhgbT9cXdr6IsIRVksh/2reT/Whxbqcxb7RY7DTYrCEk xqgR3sgGzpbuV/jigvnF+b1ZFZE7nDEjLGuxytK2mrC++/+3Zye/r8TZwErNk47j +ttec/3pgr+ozoXi04UNfHCR1SZMORmTCWVKvyFfA== X-ME-Proxy: X-ME-Sender: Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.messagingengine.com (Postfix) with ESMTPA id 16041102E5; Thu, 27 Sep 2018 11:46:48 -0400 (EDT) Date: Thu, 27 Sep 2018 17:46:47 +0200 From: Greg KH To: zhong jiang Cc: iamjoonsoo.kim@lge.com, rientjes@google.com, cl@linux.com, penberg@kernel.org, akpm@linux-foundation.org, mhocko@suse.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [STABLE PATCH] slub: make ->cpu_partial unsigned int Message-ID: <20180927154647.GB31654@kroah.com> References: <1538059420-14439-1-git-send-email-zhongjiang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1538059420-14439-1-git-send-email-zhongjiang@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 27, 2018 at 10:43:40PM +0800, zhong jiang wrote: > From: Alexey Dobriyan > > /* > * 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. > Because 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. > > Link: 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. This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html for how to do this properly.