From patchwork Sat Jun 27 03:33:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 222994 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B1A17C433DF for ; Sat, 27 Jun 2020 03:33:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 882B02084C for ; Sat, 27 Jun 2020 03:33:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593228830; bh=9aCY+fs856WbCobIwLtg6Sdo5vaEx5w2kdSz5ZqKKaI=; h=Date:From:To:Subject:In-Reply-To:List-ID:From; b=kR2HTx2r6HYXYLe70Jy5MJ/IYTysw0h1ajhb6aWbZQo04OkCFsfcuGYo6pXQoqjYX V0NpLtyAhNrvLCCJGJb9hyReChAQW8X+G7KE7Ke1+/rxFpSh/s7t72fdcXwRpGeCdR pDcUfyzDJy1nWyRs3YeAEdvw36sLG0M0GESOQE+E= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726008AbgF0Ddu (ORCPT ); Fri, 26 Jun 2020 23:33:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:45402 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725913AbgF0Ddu (ORCPT ); Fri, 26 Jun 2020 23:33:50 -0400 Received: from localhost.localdomain (c-71-198-47-131.hsd1.ca.comcast.net [71.198.47.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8546920857; Sat, 27 Jun 2020 03:33:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593228829; bh=9aCY+fs856WbCobIwLtg6Sdo5vaEx5w2kdSz5ZqKKaI=; h=Date:From:To:Subject:In-Reply-To:From; b=Q5Q/6CvnXTfgEOkWScDUEMhRfkuibLVchJYnUFWPVkE98b85nIVXIVq0jEAVf0Whv CCJePwEmu6QCSbVG0eNeguPy5lRcbNSwB0Oa5KPDSK1RrCKqTqqMPrbTOqaN840YhL rl88slw/zsQW3n40ORSyJZsn55D0h0mlHcu8iE+k= Date: Fri, 26 Jun 2020 20:33:49 -0700 From: Andrew Morton To: cai@lca.pw, guro@fb.com, hannes@cmpxchg.org, mhocko@suse.com, mm-commits@vger.kernel.org, songmuchun@bytedance.com, stable@vger.kernel.org, vdavydov.dev@gmail.com Subject: [merged] mm-memcontrol-fix-do-not-put-the-css-reference.patch removed from -mm tree Message-ID: <20200627033349.GJZiEpfqJ%akpm@linux-foundation.org> In-Reply-To: <20200625202807.b630829d6fa55388148bee7d@linux-foundation.org> User-Agent: s-nail v14.8.16 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch titled Subject: mm/memcontrol.c: add missed css_put() has been removed from the -mm tree. Its filename was mm-memcontrol-fix-do-not-put-the-css-reference.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Muchun Song Subject: mm/memcontrol.c: add missed css_put() We should put the css reference when memory allocation failed. Link: http://lkml.kernel.org/r/20200614122653.98829-1-songmuchun@bytedance.com Fixes: f0a3a24b532d ("mm: memcg/slab: rework non-root kmem_cache lifecycle management") Signed-off-by: Muchun Song Acked-by: Roman Gushchin Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Vladimir Davydov Cc: Qian Cai Cc: Signed-off-by: Andrew Morton --- mm/memcontrol.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/mm/memcontrol.c~mm-memcontrol-fix-do-not-put-the-css-reference +++ a/mm/memcontrol.c @@ -2772,8 +2772,10 @@ static void memcg_schedule_kmem_cache_cr return; cw = kmalloc(sizeof(*cw), GFP_NOWAIT | __GFP_NOWARN); - if (!cw) + if (!cw) { + css_put(&memcg->css); return; + } cw->memcg = memcg; cw->cachep = cachep;