[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <hbkgbz3cmnd5e5qftzlmulc2so6jhvn6k7klpuqkod5hi3l6sp@53xgyxqgwhg2>
Date: Mon, 14 Oct 2024 15:37:13 +0200
From: Michal Koutný <mkoutny@...e.com>
To: Xiu Jianfeng <xiujianfeng@...weicloud.com>
Cc: tj@...nel.org, lizefan.x@...edance.com, hannes@...xchg.org,
roman.gushchin@...ux.dev, cgroups@...r.kernel.org, linux-kernel@...r.kernel.org,
wangweiyang2@...wei.com
Subject: Re: [PATCH] cgroup: Fix potential overflow issue when checking
max_depth
Hello.
On Sat, Oct 12, 2024 at 07:22:46AM GMT, Xiu Jianfeng <xiujianfeng@...weicloud.com> wrote:
> It's worth mentioning that this issue is unlikely to occur in reality,
> as it's impossible to have a depth of INT_MAX hierarchy, but should be
> be avoided logically.
Strictly speaking the overflow would be undefined behavior (Out of curiousity --
have you figured this out with a checker tool or code reading?)
Logically (neglecting UB), max_depth=INT_MAX would behave like intended
(no limit).
> Fixes: 1a926e0bbab8 ("cgroup: implement hierarchy limits")
> Signed-off-by: Xiu Jianfeng <xiujianfeng@...wei.com>
> ---
> kernel/cgroup/cgroup.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Michal Koutný <mkoutny@...e.com>
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists