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]
Date:   Thu, 27 Oct 2022 10:05:58 +0200
From:   Michal Koutný <mkoutny@...e.com>
To:     "haifeng.xu" <haifeng.xu@...pee.com>
Cc:     tj@...nel.org, lizefan.x@...edance.com, hannes@...xchg.org,
        cgroups@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] cgroup: Simplify code in css_set_move_task

Hello.

On Thu, Oct 20, 2022 at 07:47:01AM +0000, "haifeng.xu" <haifeng.xu@...pee.com> wrote:
> -	lockdep_assert_held(&css_set_lock);
> +	if (!cset || css_set_populated(cset))
> +		return;

1) the guard should be css_set_populated() ^ populated (when unsetting
the populated trait)

2) I'd keep the lockdep_assert_held() after it anyway.

Also the commit message should explain what's the reason to move
css_set_populated() after css_set_move_task().


Thanks,
Michal

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ