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: <20220105193504.GD6464@blackbody.suse.cz>
Date:   Wed, 5 Jan 2022 20:35:04 +0100
From:   Michal Koutný <mkoutny@...e.com>
To:     Wei Yang <richard.weiyang@...il.com>
Cc:     tj@...nel.org, lizefan.x@...edance.com, hannes@...xchg.org,
        cgroups@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] cgroup/rstat: check updated_next only for root

On Sat, Dec 25, 2021 at 12:09:32AM +0000, Wei Yang <richard.weiyang@...il.com> wrote:
> This means we can remove the check on ->updated_next, if we make sure
> the subtree from @root is on list, which could be done by checking
> updated_next for root.

Nice refactoring.

> @@ -96,9 +97,12 @@ static struct cgroup *cgroup_rstat_cpu_pop_updated(struct cgroup *pos,
>  	 * We're gonna walk down to the first leaf and visit/remove it.  We
>  	 * can pick whatever unvisited node as the starting point.
>  	 */
> -	if (!pos)
> +	if (!pos) {
>  		pos = root;
> -	else
> +		// return NULL if this subtree is not on-list
> +		if (!cgroup_rstat_cpu(pos, cpu)->updated_next)
> +			return NULL;
> +	} else
+		/* return NULL if this subtree is not on-list */

Just a coding style nitpick.

The patch is otherwise
Reviewed-by: Michal Koutný <mkoutny@...e.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ