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] [thread-next>] [day] [month] [year] [list]
Message-ID: <sowksqih3jeosuqa7cqnnwnexrgklttpjpfzdxjv2tmc7ym45r@vrmubshmlyqi>
Date: Tue, 16 Dec 2025 10:51:41 +0100
From: Michal Koutný <mkoutny@...e.com>
To: Chen Ridong <chenridong@...weicloud.com>
Cc: longman@...hat.com, tj@...nel.org, hannes@...xchg.org, 
	cgroups@...r.kernel.org, linux-kernel@...r.kernel.org, lujialin4@...wei.com
Subject: Re: [PATCH -next] cpuset: add cpuset1_online_css helper for
 v1-specific operations

On Tue, Dec 16, 2025 at 01:28:45AM +0000, Chen Ridong <chenridong@...weicloud.com> wrote:
> From: Chen Ridong <chenridong@...wei.com>
> 
> This commit introduces the cpuset1_online_css helper to centralize
> v1-specific handling during cpuset online. It performs operations such as
> updating the CS_SPREAD_PAGE, CS_SPREAD_SLAB, and CGRP_CPUSET_CLONE_CHILDREN
> flags, which are unique to the cpuset v1 control group interface.
> 
> The helper is now placed in cpuset-v1.c to maintain clear separation
> between v1 and v2 logic.

It makes sense to me.

> +/* v1-specific operation — caller must hold cpuset_full_lock. */
> +void cpuset1_online_css(struct cgroup_subsys_state *css)
> +{
> +	struct cpuset *tmp_cs;
> +	struct cgroup_subsys_state *pos_css;
> +	struct cpuset *cs = css_cs(css);
> +	struct cpuset *parent = parent_cs(cs);
> +

+	lockdep_assert_held(&cpuset_mutex);
+	lockdep_assert_cpus_held();

When it's carved out from under cpuset_full_lock().


> @@ -3636,39 +3630,8 @@ static int cpuset_css_online(struct cgroup_subsys_state *css)
>  		cs->effective_mems = parent->effective_mems;
>  	}
>  	spin_unlock_irq(&callback_lock);
> +	cpuset1_online_css(css);

guard with !is_in_v2mode()

Thanks,
Michal

Download attachment "signature.asc" of type "application/pgp-signature" (266 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ