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] [day] [month] [year] [list]
Message-ID: <4CD0506F.6080600@gmail.com>
Date:	Wed, 03 Nov 2010 01:54:55 +0800
From:	Li Zefan <lizf.kern@...il.com>
To:	Jiri Olsa <jolsa@...hat.com>
CC:	dhowells@...hat.com, lizf@...fujitsu.com, paul.moore@...com,
	johannes@...solutions.net, dipankar@...ibm.com,
	linux-kernel@...r.kernel.org,
	containers@...ts.linux-foundation.org, kvm@...r.kernel.org
Subject: Re: [PATCH 1/3] cgroup - removing superfluous rcu_read_lock_held
 check

On 2010年11月02日 03:15, Jiri Olsa wrote:
> hi,

This..

> the rcu_dereference_check is defined as
> 
> 	#define rcu_dereference_check(p, c) \
> 	   __rcu_dereference_check((p), rcu_read_lock_held() || (c), __rcu)
> 
> so the caller does not need to specify rcu_read_lock_held() condition.
>
 
> wbr,
> jirka

and this should be excluded from the changelog.

> 
> 
> Signed-off-by: Jiri Olsa <jolsa@...hat.com>

Reviewed-by: Li Zefan <lizf@...fujitsu.com>

However a nitpick:

> ---
>  include/linux/cgroup.h |    1 -
>  kernel/cgroup.c        |    6 ++----
>  2 files changed, 2 insertions(+), 5 deletions(-)
...
> @@ -4544,7 +4542,7 @@ unsigned short css_id(struct cgroup_subsys_state *css)
>  	 * it's unchanged until freed.
>  	 */
>  	cssid = rcu_dereference_check(css->id,
> -			rcu_read_lock_held() || atomic_read(&css->refcnt));
> +			atomic_read(&css->refcnt));

Now the 2 lines can be made into one line and still fit into 80 chars.

>  
>  	if (cssid)
>  		return cssid->id;
> @@ -4557,7 +4555,7 @@ unsigned short css_depth(struct cgroup_subsys_state *css)
>  	struct css_id *cssid;
>  
>  	cssid = rcu_dereference_check(css->id,
> -			rcu_read_lock_held() || atomic_read(&css->refcnt));
> +			atomic_read(&css->refcnt));

dito

>  
>  	if (cssid)
>  		return cssid->depth;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ