Lai Jiangshan d74185ed27 markers: fix unregister bug and reenter bug
unregister bug:

codes using makers are typically calling marker_probe_unregister()
and then destroying the data that marker_probe_func needs(or
unloading this module). This is bug when the corresponding
marker_probe_func is still running(on other cpus),
it is using the destroying/ed data.

we should call synchronize_sched() after marker_update_probes().

reenter bug:

marker_probe_register(), marker_probe_unregister() and
marker_probe_unregister_private_data() are not reentrant safe
functions. these 3 functions release markers_mutex and then
require it again and do "entry->oldptr = old; ...", but entry->oldptr
maybe is using now for these 3 functions may reenter when markers_mutex
is released.

we use synchronize_sched() instead of call_rcu_sched() to fix
this bug. actually we can do:
"
if (entry->rcu_pending)
		rcu_barrier_sched();
"
after require markers_mutex again. but synchronize_sched()
is better and simpler. For these 3 functions are not critical path.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-10-14 10:38:19 +02:00
..
2008-08-14 14:58:01 +02:00
2008-05-01 08:03:59 -07:00
2008-07-26 20:53:20 -04:00
2008-03-30 14:18:41 -07:00
2008-07-28 14:37:38 +02:00
2007-07-16 09:05:50 -07:00
2008-08-13 12:55:10 +02:00
2008-10-14 10:28:28 +02:00
2008-10-14 10:35:12 +02:00
2008-09-02 19:21:40 -07:00
2008-08-25 17:39:57 +02:00
2007-07-16 09:05:50 -07:00
2008-02-06 10:41:02 -08:00
2008-10-13 09:51:40 -07:00
2008-07-25 10:53:45 -07:00
2008-10-14 10:34:07 +02:00
2008-02-08 09:22:31 -08:00