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: <200911021533.46413.dmitry.torokhov@gmail.com>
Date:	Mon, 2 Nov 2009 15:33:46 -0800
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	paulmck@...ux.vnet.ibm.com
Cc:	Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
	nhorman@...driver.com, linux-kernel@...r.kernel.org
Subject: Re: [2.6.32-rc5-git5] synchronize_sched() inside spin_lock()?

On Monday 02 November 2009 02:30:28 pm Paul E. McKenney wrote:
> On Mon, Nov 02, 2009 at 09:00:06PM +0900, Tetsuo Handa wrote:
> > Commit: 4ea7e38696c7e798c47ebbecadfd392f23f814f9
> >
> > tracepoint_synchronize_unregister() calls synchronize_sched(), but it is
> > between spin_lock() and spin_unlock(). Is it OK?
> 
> Calling synchronize_sched() while holding a spinlock would indeed be
> very bad, but the code below seems to instead be invoking call_rcu(),
> which is no problem.
> 
> Or am I missing something here?
> 
> 							Thanx, Paul
> 
> > static int set_all_monitor_traces(int state)
> > {
> > 	int rc = 0;
> > 	struct dm_hw_stat_delta *new_stat = NULL;
> > 	struct dm_hw_stat_delta *temp;
> >
> > 	spin_lock(&trace_state_lock);
> >
> > 	switch (state) {
> > 	case TRACE_ON:
> > 		rc |= register_trace_kfree_skb(trace_kfree_skb_hit);
> > 		rc |= register_trace_napi_poll(trace_napi_poll_hit);
> > 		break;
> > 	case TRACE_OFF:
> > 		rc |= unregister_trace_kfree_skb(trace_kfree_skb_hit);
> > 		rc |= unregister_trace_napi_poll(trace_napi_poll_hit);
> >
> > 		tracepoint_synchronize_unregister();

This has synchronize_sched() inside.


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