mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chen Ridong <chenridong@huaweicloud.com>
To: longman@redhat.com, tj@kernel.org, hannes@cmpxchg.org, mkoutny@suse.com
Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
	lujialin4@huawei.com, chenridong@huawei.com
Subject: Re: [PATCH cgroup/for-next] cpuset: fix missing error return in update_cpumask
Date: Fri, 19 Sep 2025 18:12:49 +0800	[thread overview]
Message-ID: <eefa4f64-a2b2-47f4-8eb6-940f90eca850@huaweicloud.com> (raw)
In-Reply-To: <20250919094903.3060470-1-chenridong@huaweicloud.com>



On 2025/9/19 17:49, Chen Ridong wrote:
> From: Chen Ridong <chenridong@huawei.com>
> 
> The commit c6366739804f ("cpuset: refactor cpus_allowed_validate_change")
> inadvertently removed the error return when cpus_allowed_validate_change()
> fails. This patch restores the proper error handling by returning retval
> when the validation check fails.
> 
> Fixes: c6366739804f ("cpuset: refactor cpus_allowed_validate_change")
> Signed-off-by: Chen Ridong <chenridong@huawei.com>
> ---
>  kernel/cgroup/cpuset.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
> index 506a7178f0b3..20dface3c3e0 100644
> --- a/kernel/cgroup/cpuset.c
> +++ b/kernel/cgroup/cpuset.c
> @@ -2515,7 +2515,8 @@ static int update_cpumask(struct cpuset *cs, struct cpuset *trialcs,
>  	compute_trialcs_excpus(trialcs, cs);
>  	trialcs->prs_err = PERR_NONE;
>  
> -	if (cpus_allowed_validate_change(cs, trialcs, &tmp) < 0)
> +	retval = cpus_allowed_validate_change(cs, trialcs, &tmp);
> +	if (retval < 0)
>  		goto out_free;
>  
>  	/*

Hi Longman, TJ,

Sorry about the bug introduced in patch 8. Could you please apply this patch to fix the issue?

-- 
Best regards,
Ridong


  reply	other threads:[~2025-09-19 10:12 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-17  6:04 [PATCH -next 00/11] Refactor cpus mask setting Chen Ridong
2025-09-17  6:04 ` [PATCH -next 01/11] cpuset: move the root cpuset write check earlier Chen Ridong
2025-09-17  6:04 ` [PATCH -next 02/11] cpuset: remove unused assignment to trialcs->partition_root_state Chen Ridong
2025-09-17  6:04 ` [PATCH -next 03/11] cpuset: change return type of is_partition_[in]valid to bool Chen Ridong
2025-09-17  6:04 ` [PATCH -next 04/11] cpuset: Refactor exclusive CPU mask computation logic Chen Ridong
2025-09-17  6:04 ` [PATCH -next 05/11] cpuset: refactor CPU mask buffer parsing logic Chen Ridong
2025-09-17  6:04 ` [PATCH -next 06/11] cpuset: introduce cpus_excl_conflict and mems_excl_conflict helpers Chen Ridong
2025-09-17  6:04 ` [PATCH -next 07/11] cpuset: refactor out validate_partition Chen Ridong
2025-09-17  6:04 ` [PATCH -next 08/11] cpuset: refactor cpus_allowed_validate_change Chen Ridong
2025-09-19  9:49   ` [PATCH cgroup/for-next] cpuset: fix missing error return in update_cpumask Chen Ridong
2025-09-19 10:12     ` Chen Ridong [this message]
2025-09-19 16:43     ` Tejun Heo
2025-09-20  0:54       ` Chen Ridong
2025-09-17  6:04 ` [PATCH -next 09/11] cpuset: introduce partition_cpus_change Chen Ridong
2025-09-17  6:04 ` [PATCH -next 10/11] cpuset: use parse_cpulist for setting cpus.exclusive Chen Ridong
2025-09-17  6:04 ` [PATCH -next 11/11] cpuset: use partition_cpus_change for setting exclusive cpus Chen Ridong
2025-09-17 20:15 ` [PATCH -next 00/11] Refactor cpus mask setting Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=eefa4f64-a2b2-47f4-8eb6-940f90eca850@huaweicloud.com \
    --to=chenridong@huaweicloud.com \
    --cc=cgroups@vger.kernel.org \
    --cc=chenridong@huawei.com \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=lujialin4@huawei.com \
    --cc=mkoutny@suse.com \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®