lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Yww5xZtKLgBFCuY2@slm.duckdns.org>
Date:   Sun, 28 Aug 2022 18:00:05 -1000
From:   Tejun Heo <tj@...nel.org>
To:     Stephen Rothwell <sfr@...b.auug.org.au>
Cc:     Michal Koutný <mkoutny@...e.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Next Mailing List <linux-next@...r.kernel.org>,
        cgroups@...r.kernel.org
Subject: [PATCH] cgroup: Fix build failure when CONFIG_SHRINKER_DEBUG

>From c0f2df49cf2471289d5aabf16f50ac26eb268f7d Mon Sep 17 00:00:00 2001
From: Tejun Heo <tj@...nel.org>
Date: Sun, 28 Aug 2022 17:54:15 -1000
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

fa7e439cf90b ("cgroup: Homogenize cgroup_get_from_id() return value") broken
build when CONFIG_SHRINKER_DEBUG by trying to return an errno from
mem_cgroup_get_from_ino() which returns struct mem_cgroup *. Fix by using
ERR_CAST() instead.

Signed-off-by: Tejun Heo <tj@...nel.org>
Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>
Cc: Michal Koutný <mkoutny@...e.com>f
Fixes: fa7e439cf90b ("cgroup: Homogenize cgroup_get_from_id() return value")
---
Sorry about that. Applied this fix to cgroup/for-6.1.

Thanks.

 mm/memcontrol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 86f5ca8c6fa6..e9fc364d5e96 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -5111,7 +5111,7 @@ struct mem_cgroup *mem_cgroup_get_from_ino(unsigned long ino)
 
 	cgrp = cgroup_get_from_id(ino);
 	if (IS_ERR(cgrp))
-		return PTR_ERR(cgrp);
+		return ERR_CAST(cgrp);
 
 	css = cgroup_get_e_css(cgrp, &memory_cgrp_subsys);
 	if (css)
-- 
2.37.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ