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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 21 Jan 2011 16:53:23 +0100
From:	Oleg Nesterov <oleg@...hat.com>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	mingo@...hat.com, hpa@...or.com, acme@...hat.com, paulus@...ba.org,
	linux-kernel@...r.kernel.org, stern@...land.harvard.edu,
	a.p.zijlstra@...llo.nl, fweisbec@...il.com, roland@...hat.com,
	tglx@...utronix.de, prasad@...ux.vnet.ibm.com,
	linux-tip-commits@...r.kernel.org
Subject: Re: [tip:perf/urgent] perf: Fix find_get_context() vs
	perf_event_exit_task() race

On 01/21, Ingo Molnar wrote:
>
> * tip-bot for Oleg Nesterov <oleg@...hat.com> wrote:
>
> > @@ -6127,7 +6133,7 @@ static void perf_event_exit_task_context(struct task_struct *child, int ctxn)
> >  	 * scheduled, so we are now safe from rescheduling changing
> >  	 * our context.
> >  	 */
> > -	child_ctx = child->perf_event_ctxp[ctxn];
> > +	child_ctx = rcu_dereference(child->perf_event_ctxp[ctxn]);
> >  	task_ctx_sched_out(child_ctx, EVENT_ALL);
> >
> >  	/*
>
> hm, this one's causing:
>
>  [   25.557579] ===================================================
>  [   25.561361] [ INFO: suspicious rcu_dereference_check() usage. ]


Oh, indeed, I am stupid!

I added rcu_dereference() because it has smp_read_barrier_depends(),
but I forgot about rcu_dereference_check().

I'll send the fix soon...

Oleg.

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