From nobody Sun Feb 8 06:07:37 2026 Received: from mta22.hihonor.com (mta22.honor.com [81.70.192.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AF99D1F55E0; Thu, 17 Apr 2025 07:30:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=81.70.192.198 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744875011; cv=none; b=FbgFSojAkb1s6RxVjn8U0JwMHol1BbbP48U89gBhVWGIaJ9Cga0Ub80FCT1OITkO9OfATVjsRwZ1xnNt4Yghtl18N9Y19N2D18ng1bw42rtpP6l117cBWZjV3hTG55oBxG7mydST+718EChAEWBy5It6d0jArBkEFkVvcUL03pU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744875011; c=relaxed/simple; bh=4r2xm5VMxty8PMSLRQJuI6jowIacihcMePO3O1ALorw=; h=From:To:CC:Subject:Date:Message-ID:Content-Type:MIME-Version; b=F0SzIqEFLVIk0wHRHvhONwv3tTXao9eiZ/HE8M42R+ZNZOvXF2P6aZCL2+BbaOp06CF4qaKxTvC1H5P8kQpolzXwbFvc/Q6hNedlFnLQdx3wgAipdPEdCW185Oprcqyy+x8PZ3prL1bOWqXhHRa0HKYs+nu333m8NLTU+8WBl44= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=honor.com; spf=pass smtp.mailfrom=honor.com; arc=none smtp.client-ip=81.70.192.198 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=honor.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=honor.com Received: from w001.hihonor.com (unknown [10.68.25.235]) by mta22.hihonor.com (SkyGuard) with ESMTPS id 4ZdTzm0b84zYlBM9; Thu, 17 Apr 2025 15:29:24 +0800 (CST) Received: from a006.hihonor.com (10.68.23.242) by w001.hihonor.com (10.68.25.235) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Thu, 17 Apr 2025 15:30:01 +0800 Received: from a007.hihonor.com (10.68.22.31) by a006.hihonor.com (10.68.23.242) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Thu, 17 Apr 2025 15:30:00 +0800 Received: from a007.hihonor.com ([fe80::e866:83ac:f23b:c25c]) by a007.hihonor.com ([fe80::e866:83ac:f23b:c25c%10]) with mapi id 15.02.1544.011; Thu, 17 Apr 2025 15:30:00 +0800 From: gaoxu To: Tejun Heo , Johannes Weiner , =?utf-8?B?Ik1pY2hhbCBLb3V0bsO9Ig==?= CC: "cgroups@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "surenb@google.com" , yipengxiang Subject: [PATCH] cgroup: Fix compilation issue due to cgroup_mutex not being exported Thread-Topic: [PATCH] cgroup: Fix compilation issue due to cgroup_mutex not being exported Thread-Index: AduvagKxP1b3Kr31RQqt+yXrhxkqpw== Date: Thu, 17 Apr 2025 07:30:00 +0000 Message-ID: <24763f5c8a13421fa6dc3672a57a7836@honor.com> Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 When adding folio_memcg function call in the zram module for Android16-6.12, the following error occurs during compilation: ERROR: modpost: "cgroup_mutex" [../soc-repo/zram.ko] undefined! This error is caused by the indirect call to lockdep_is_held(&cgroup_mutex) within folio_memcg. The export setting for cgroup_mutex is controlled by the CONFIG_PROVE_RCU macro. If CONFIG_LOCKDEP is enabled while CONFIG_PROVE_RCU is not, this compilation error will occur. To resolve this issue, add a parallel macro CONFIG_LOCKDEP control to ensure cgroup_mutex is properly exported when needed. Signed-off-by: gao xu Acked-by: Michal Koutn=C3=BD --- kernel/cgroup/cgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c index 447ac857e..9e60ff629 100644 --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c @@ -90,7 +90,7 @@ DEFINE_MUTEX(cgroup_mutex); DEFINE_SPINLOCK(css_set_lock); =20 -#ifdef CONFIG_PROVE_RCU +#if (defined CONFIG_PROVE_RCU || defined CONFIG_LOCKDEP) EXPORT_SYMBOL_GPL(cgroup_mutex); EXPORT_SYMBOL_GPL(css_set_lock); #endif --=20 2.17.1