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: <1366619120.2721.0.camel@laptop>
Date:	Mon, 22 Apr 2013 10:25:20 +0200
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	paulmck@...ux.vnet.ibm.com
Cc:	paulus@...ba.org, mingo@...hat.com, acme@...stprotocols.net,
	linux-kernel@...r.kernel.org, ajax@...hat.com, gusld@...ibm.com
Subject: Re: [PATCH] events: Protect access via task_subsys_state_check()

On Fri, 2013-04-19 at 12:01 -0700, Paul E. McKenney wrote:
> The following RCU splat indicates lack of RCU protection:

...

> This commit therefore adds the required RCU read-side critical section to
> perf_event_comm().
> 
> Reported-by: Adam Jackson <ajax@...hat.com>
> Signed-off-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
> Tested-by: Gustavo Luiz Duarte <gusld@...ibm.com>

Acked-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>

> diff --git a/kernel/events/core.c b/kernel/events/core.c
> index b0cd865..8db9551 100644
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -4593,6 +4593,7 @@ void perf_event_comm(struct task_struct *task)
>  	struct perf_event_context *ctx;
>  	int ctxn;
>  
> +	rcu_read_lock();
>  	for_each_task_context_nr(ctxn) {
>  		ctx = task->perf_event_ctxp[ctxn];
>  		if (!ctx)
> @@ -4600,6 +4601,7 @@ void perf_event_comm(struct task_struct *task)
>  
>  		perf_event_enable_on_exec(ctx);
>  	}
> +	rcu_read_unlock();
>  
>  	if (!atomic_read(&nr_comm_events))
>  		return;
> 


--
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