From: Waiman Long <longman@redhat.com>
To: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Cc: Zefan Li <lizefan.x@bytedance.com>, Tejun Heo <tj@kernel.org>,
Tom Hromatka <tom.hromatka@oracle.com>,
cgroups@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cgroup/cpuset: Fix retval in update_cpumask()
Date: Thu, 29 Feb 2024 09:24:58 -0500 [thread overview]
Message-ID: <52f842b8-2907-4eb0-ad0a-3784d54daa12@redhat.com> (raw)
In-Reply-To: <20240229101116.60043-1-kamalesh.babulal@oracle.com>
On 2/29/24 05:11, Kamalesh Babulal wrote:
> The update_cpumask(), checks for newly requested cpumask by calling
> validate_change(), which returns an error on passing an invalid set
> of cpu(s). Independent of the error returned, update_cpumask() always
> returns zero, suppressing the error and returning success to the user
> on writing an invalid cpu range for a cpuset. Fix it by returning
> retval instead, which is returned by validate_change().
>
> Fixes: 99fe36ba6fc1 ("cgroup/cpuset: Improve temporary cpumasks handling")
> Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
> ---
> kernel/cgroup/cpuset.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
> index ba36c073304a..2ddbfaa4efa9 100644
> --- a/kernel/cgroup/cpuset.c
> +++ b/kernel/cgroup/cpuset.c
> @@ -2562,7 +2562,7 @@ static int update_cpumask(struct cpuset *cs, struct cpuset *trialcs,
> update_partition_sd_lb(cs, old_prs);
> out_free:
> free_cpumasks(NULL, &tmp);
> - return 0;
> + return retval;
> }
>
> /**
>
> base-commit: cf1182944c7cc9f1c21a8a44e0d29abe12527412
LGTM, thanks for the fix.
Reviewed-by: Waiman Long <longman@redhat.com>
next prev parent reply other threads:[~2024-02-29 14:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-29 10:11 Kamalesh Babulal
2024-02-29 14:24 ` Waiman Long [this message]
2024-02-29 20:38 ` 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=52f842b8-2907-4eb0-ad0a-3784d54daa12@redhat.com \
--to=longman@redhat.com \
--cc=cgroups@vger.kernel.org \
--cc=kamalesh.babulal@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan.x@bytedance.com \
--cc=tj@kernel.org \
--cc=tom.hromatka@oracle.com \
/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®