Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1634065pxb; Fri, 22 Oct 2021 04:59:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxzw8YNE8WHf+4pnnWvyjQ8dutOgd7wfs61p2ldJc0fnHdnvcqsMontwWNGpiv6bYKxWvYj X-Received: by 2002:a17:906:7c4f:: with SMTP id g15mr14308215ejp.373.1634903969148; Fri, 22 Oct 2021 04:59:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1634903969; cv=pass; d=google.com; s=arc-20160816; b=qv6CZzRKE6Tl8tTHoraz4aUD+w7DwE9PZwSb6uM0a2ZnnXvey0/kRNkkBhyomUXVDx +dl6DqB4a7Jufh4ehHRQAKPREGNLgZWp/sVnnQUtjVr+d5fCVxErhplhY7R/Oc0ISoXB 0CO471ZcNiaqHH/HNXk+gscxGBB4GP8jm8EBPj6ymp5XlaTcbybc+HozlymopQhpcp/c 24TmPVx/mUxLyMadmuTNYQkWvrvwu9nEgVkMMKrqNaaoJCwM+svPUlt+5twX4lyXlLIY Vx4I/02gIRjwEpIpiOOmsl4xMh6o68EimJDd9ml62eDWo77VoG66kav3eqPNBRuVa4zV 0KGg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:in-reply-to:user-agent:date:message-id:from :references:cc:to:subject:dkim-signature; bh=wsab649gLJGi//T9euidn7LFas7vqxiCVMXZVelw0Hk=; b=i5L9+c4ao6QiiDZ5+S3jAN/Lqmd8Ci7NdVaVwdRK358wKvxTtW1LC+hAGDEqNqYlW6 p2DzdfR56oCHRxJu6vCKsqF1c/XyzGfXMn+P4KxgVbkqIQnIqFfBVW+yUDXgu3JgeHtU j/0RX6Ei3CypaBpGbyWS0P3mNsboShxV+LGB8tB/BiqRwBU4V2cfZDoaKuzv9Phn5lDv 23Mup3fiLcT0TJ6iRLHJKKn7ee45IrCHPCDuDttjKNvmqwXGd1/bVm7/fCsiG4rx9HOh 1g5zDRtwX1yG5+Ls/4Bs2xjO3JxrAmyGs3EWMkkfomuHFB9j5T8RyPFH6AqbVgN2nefy ayXQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@windriver.com header.s=PPS06212021 header.b=Y0pe9BFI; arc=pass (i=1 spf=pass spfdomain=windriver.com dkim=pass dkdomain=windriver.com dmarc=pass fromdomain=windriver.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=windriver.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j12si9647046edt.33.2021.10.22.04.59.05; Fri, 22 Oct 2021 04:59:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@windriver.com header.s=PPS06212021 header.b=Y0pe9BFI; arc=pass (i=1 spf=pass spfdomain=windriver.com dkim=pass dkdomain=windriver.com dmarc=pass fromdomain=windriver.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=windriver.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231569AbhJVL6t (ORCPT + 99 others); Fri, 22 Oct 2021 07:58:49 -0400 Received: from mx0b-0064b401.pphosted.com ([205.220.178.238]:9020 "EHLO mx0b-0064b401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231308AbhJVL6s (ORCPT ); Fri, 22 Oct 2021 07:58:48 -0400 Received: from pps.filterd (m0250812.ppops.net [127.0.0.1]) by mx0a-0064b401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19MBjueW026317; Fri, 22 Oct 2021 11:56:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=windriver.com; h=subject : to : cc : references : from : message-id : date : in-reply-to : content-type : content-transfer-encoding : mime-version; s=PPS06212021; bh=wsab649gLJGi//T9euidn7LFas7vqxiCVMXZVelw0Hk=; b=Y0pe9BFIgvOEXDVaPg6DF3ET1J6Tv1QRgyfhSyv6TvzZFvzyCg60erPSmc1EdU7H6mj6 +mcfOUv3iCsAQt52dVx8TKm3iO2S9ye45PE5P+pCvufdgRT2yqzL4EZgHIo5Ic27WmWk dnMfxk/0pPgOwVn3T9A5wu6ev85ytjuKCBm/NCwZBKase8FwziUGQ2YtgCY8621Z7vnX Ghy22ubYvFxMlYSsmCj0wg+XlqSBg+tL7wWQg6iCSak+Enh9hLZo/nX0o2Xaw5h8psYa Y5QnL6ayl8Pf0L0W6sGITFOyff4K8EX6AzXXsmNllGky8xu44hWOyVM8WKb1wZcuCsTo YA== Received: from nam02-dm3-obe.outbound.protection.outlook.com (mail-dm3nam07lp2040.outbound.protection.outlook.com [104.47.56.40]) by mx0a-0064b401.pphosted.com with ESMTP id 3bu0uk99jy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 22 Oct 2021 11:56:03 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hPwwcZPGptPLkYxz+LqIjciU1s0D5U2jqACDTVq4eHjb3YAOoVLWNd6lmebwjYErv4l1cLy33ZfbSoe0izUoN36POcfX6I7WhMEqn//UMdGmyaapc3/o8QmM4ZFnWVjHSNhGH9esWbpTHeS2GfzmJROS+gliNC0l+289VUjum4OtyUoPYmbF5sae3KX95tnLOeJlecvpw6HMbAPIJTyTVX/bRkj+cwkNqT4HT7LVWY36nObAorBL6Qf3KUkVLAK3fz5B+hFq4oUQVF+0ofznbZHU7oZNib7A0dVYjNDIO8lJ7t/ZGD1ZRZnHxAty9DAOUxu5429KRrlDIOtrJWnRPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wsab649gLJGi//T9euidn7LFas7vqxiCVMXZVelw0Hk=; b=CuV4NMoRvCmayCia7pgNOVWTqZrvjYC04zH18FQn6I3zqH9uwcSS3VyrkTdRpbrQNxWE2NA2rugbR2emKg9uf6yPlwypprVEaXiFLp6W33dxyXgh+3Oa0SWNcgaIWuwEfwuVYU6MXwTJg32rurgsCVuv3XXpFgwRAW0Ny6G1+083zKZ/PatBtuYzEGS1Y4rErg30ZhrRZlVVryV+IEFor0lWPzAXyg+v7/d0cwuaOBdoOfTj2p9ugx/3xNfokqs1ACOXhhIaSL6yloZR5yYYyBqde7o1hQKcspnPRu6zDWZE5NGbZJNyc+pbQyg1oFanYIScKz2X+wJviJ2T1uU9ng== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=windriver.com; dmarc=pass action=none header.from=windriver.com; dkim=pass header.d=windriver.com; arc=none Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=windriver.com; Received: from PH7PR11MB5819.namprd11.prod.outlook.com (2603:10b6:510:13b::9) by PH0PR11MB5079.namprd11.prod.outlook.com (2603:10b6:510:3d::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.18; Fri, 22 Oct 2021 11:55:59 +0000 Received: from PH7PR11MB5819.namprd11.prod.outlook.com ([fe80::3508:ff4c:362d:579c]) by PH7PR11MB5819.namprd11.prod.outlook.com ([fe80::3508:ff4c:362d:579c%7]) with mapi id 15.20.4628.018; Fri, 22 Oct 2021 11:55:59 +0000 Subject: Re: [V2][PATCH] cgroup: fix memory leak caused by missing cgroup_bpf_offline To: Roman Gushchin Cc: Tejun Heo , Zefan Li , Johannes Weiner , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Jens Axboe , Ming Lei , mkoutny@suse.com, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org References: <20211018075623.26884-1-quanyang.wang@windriver.com> From: Quanyang Wang Message-ID: <35e9e89f-d92f-06f9-b919-ef956d99d7df@windriver.com> Date: Fri, 22 Oct 2021 19:55:50 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: HK2PR02CA0211.apcprd02.prod.outlook.com (2603:1096:201:20::23) To PH7PR11MB5819.namprd11.prod.outlook.com (2603:10b6:510:13b::9) MIME-Version: 1.0 Received: from [128.224.162.199] (60.247.85.82) by HK2PR02CA0211.apcprd02.prod.outlook.com (2603:1096:201:20::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.16 via Frontend Transport; Fri, 22 Oct 2021 11:55:56 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5b27e513-685e-44f4-8ea8-08d99552ea02 X-MS-TrafficTypeDiagnostic: PH0PR11MB5079: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1850; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OfYZUHy5lMlj2TNC/zvjsCeH2F8u/UeSBK9ioEd8cV03cv/8l5FYIK0nIsy+5cchLBLpIteLwhDfH7Mav49bR3YskkmQx3Frcw6q9XqTAaJbuEa7nonRdBV5NQ5b5pB8cIo+cQSIHaSkjOz+a1qmsL1ihvOOx6wqn0X76sLa3kAVk6aXVQR7RWtv+l9GaXNtxJhyhL2krnFCpGVP7RHtm7xaGfSTu/tujR7hjxf32J0Noawf/MlcwDuUPSdcsfQkU0bVSnFH8H4HPcdZXL9UhlUNIZsSC4ySrfZS04mT/WPBQvPdiQCe6UvnKzWRjk+GxESvB5w3BswnJQ6sbJquhsGpuyJikroEjP+kdnePxLOATlR8JctoCfpPUjPhIolV7TlYUap9NSR3fxZtJfuGJ30Sw1rQrkQdzo5b0VG3P3Zq2FxJuBBKlXsfSYjjSkSp/boui0dDNYEu/ZTMKq84SYJoUJIcRKA8MtukysS7VE3qCQQfdZaDASVX7IPvsYPXxc7Yjwt9xB0710HzKnpbHr6SEMBSPUtRycRLA30/ZMcvlyC6Q8Nee4uDsGUKIlpzjY6LLslMescm5+VPErUURE/+OOi8tkfbscB0REbWx6o2FJ4tk+B+y/WFQuhuqpXp5GC+wJ3as3r110ePuIX8Q0OThyMCzxCILVGfYF7oBAtI0zXxFMpLur2N6WBoVZyBxnsX1+lgWd7djuR6Qe06JVDLqUTeOEYx3EFP+3KSMUMJ9ORMo5HA5N+9xaA7nKmbD+vVDdMhljE3DAI+NgXirrF+6lohxxkS9BxwkQlFO60= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH7PR11MB5819.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(6666004)(4326008)(6706004)(508600001)(6486002)(186003)(26005)(8936002)(66946007)(66556008)(54906003)(316002)(8676002)(6916009)(66476007)(7416002)(38100700002)(2906002)(86362001)(5660300002)(16576012)(52116002)(31696002)(44832011)(31686004)(53546011)(2616005)(956004)(36756003)(38350700002)(78286007)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?NTROU3B1MjJuTm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utf-8?B?TENxNWZKdk9vcWpQL24vU1AyR3I4Tm1QZEY0R0FiTTRPU3JHVndhTU1lQlQ3?= =?utf-8?B?VlpwWGo3SlM2Y2FsQzNTVjMxNitMY1k1TTlDdmttOVpoQTV2d3c5L1BTQms2?= =?utf-8?Q?E/XuHbtfQPVrYxwGakjsgu4yufL+hYqB?= X-OriginatorOrg: windriver.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5b27e513-685e-44f4-8ea8-08d99552ea02 X-MS-Exchange-CrossTenant-AuthSource: PH7PR11MB5819.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2021 11:55:59.6683 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 8ddb2873-a1ad-4a18-ae4e-4644631433be X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: quanyang.wang@windriver.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5079 X-Proofpoint-ORIG-GUID: tcCL2iwepCNZnbn30kZrOukyDroWkb3H X-Proofpoint-GUID: tcCL2iwepCNZnbn30kZrOukyDroWkb3H X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-22_03,2021-10-21_02,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 priorityscore=1501 bulkscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 clxscore=1015 mlxscore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110220067 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Roman, On 10/22/21 9:30 AM, Roman Gushchin wrote: > On Mon, Oct 18, 2021 at 03:56:23PM +0800, quanyang.wang@windriver.com wrote: >> From: Quanyang Wang >> >> When enabling CONFIG_CGROUP_BPF, kmemleak can be observed by running >> the command as below: >> >> $mount -t cgroup -o none,name=foo cgroup cgroup/ >> $umount cgroup/ >> >> unreferenced object 0xc3585c40 (size 64): >> comm "mount", pid 425, jiffies 4294959825 (age 31.990s) >> hex dump (first 32 bytes): >> 01 00 00 80 84 8c 28 c0 00 00 00 00 00 00 00 00 ......(......... >> 00 00 00 00 00 00 00 00 6c 43 a0 c3 00 00 00 00 ........lC...... >> backtrace: >> [] cgroup_bpf_inherit+0x44/0x24c >> [<1f03679c>] cgroup_setup_root+0x174/0x37c >> [] cgroup1_get_tree+0x2c0/0x4a0 >> [] vfs_get_tree+0x24/0x108 >> [] path_mount+0x384/0x988 >> [] do_mount+0x64/0x9c >> [<208c9cfe>] sys_mount+0xfc/0x1f4 >> [<06dd06e0>] ret_fast_syscall+0x0/0x48 >> [] 0xbeb4daa8 >> >> This is because that since the commit 2b0d3d3e4fcf ("percpu_ref: reduce >> memory footprint of percpu_ref in fast path") root_cgrp->bpf.refcnt.data >> is allocated by the function percpu_ref_init in cgroup_bpf_inherit which >> is called by cgroup_setup_root when mounting, but not freed along with >> root_cgrp when umounting. Adding cgroup_bpf_offline which calls >> percpu_ref_kill to cgroup_kill_sb can free root_cgrp->bpf.refcnt.data in >> umount path. >> >> This patch also fixes the commit 4bfc0bb2c60e ("bpf: decouple the lifetime >> of cgroup_bpf from cgroup itself"). A cgroup_bpf_offline is needed to do a >> cleanup that frees the resources which are allocated by cgroup_bpf_inherit >> in cgroup_setup_root. >> >> And inside cgroup_bpf_offline, cgroup_get() is at the beginning and >> cgroup_put is at the end of cgroup_bpf_release which is called by >> cgroup_bpf_offline. So cgroup_bpf_offline can keep the balance of >> cgroup's refcount. >> >> Fixes: 2b0d3d3e4fcf ("percpu_ref: reduce memory footprint of percpu_ref in fast path") >> Fixes: 4bfc0bb2c60e ("bpf: decouple the lifetime of cgroup_bpf from cgroup itself") >> Signed-off-by: Quanyang Wang >> --- >> V1 ---> V2: >> 1. As per Daniel's suggestion, add description to commit msg about the >> balance of cgroup's refcount in cgroup_bpf_offline. >> 2. As per Michal's suggestion, add tag "Fixes: 4bfc0bb2c60e" and add >> description about it. >> 3. Fix indentation on the percpu_ref_is_dying line. > > Acked-by: Roman Gushchin > > The fix looks correct, two fixes tag are fine too, if only it won't > confuse scripts picking up patches for stable backports. > > In fact, it's a very cold path, which is arguably never hit in the real > life. On cgroup v2 it's not an issue. I'm not sure we need a stable > backport at all, only if it creates a noise for some automation tests. > > Quanyang, out of curiosity, how did you find it? I ran ltp testsuite to find this. ./runltp -f controllers -s cgroup Thanks, Quanyang > > Anyway, thanks for catching and fixing it! > > Roman >