Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'trace-fixes-v3.15-rc4-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace

Pull tracing fixes from Steven Rostedt:
"This contains two fixes.

The first is a long standing bug that causes bogus data to show up in
the refcnt field of the module_refcnt tracepoint. It was introduced
by a merge conflict resolution back in 2.6.35-rc days.

The result should be 'refcnt = incs - decs', but instead it did
'refcnt = incs + decs'.

The second fix is to a bug that was introduced in this merge window
that allowed for a tracepoint funcs pointer to be used after it was
freed. Moving the location of where the probes are released solved
the problem"

* tag 'trace-fixes-v3.15-rc4-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
tracepoint: Fix use of tracepoint funcs after rcu free
trace: module: Maintain a valid user count

+3 -3
+1 -1
include/trace/events/module.h
··· 80 80 81 81 TP_fast_assign( 82 82 __entry->ip = ip; 83 - __entry->refcnt = __this_cpu_read(mod->refptr->incs) + __this_cpu_read(mod->refptr->decs); 83 + __entry->refcnt = __this_cpu_read(mod->refptr->incs) - __this_cpu_read(mod->refptr->decs); 84 84 __assign_str(name, mod->name); 85 85 ), 86 86
+2 -2
kernel/tracepoint.c
··· 188 188 WARN_ON_ONCE(1); 189 189 return PTR_ERR(old); 190 190 } 191 - release_probes(old); 192 191 193 192 /* 194 193 * rcu_assign_pointer has a smp_wmb() which makes sure that the new ··· 199 200 rcu_assign_pointer(tp->funcs, tp_funcs); 200 201 if (!static_key_enabled(&tp->key)) 201 202 static_key_slow_inc(&tp->key); 203 + release_probes(old); 202 204 return 0; 203 205 } 204 206 ··· 221 221 WARN_ON_ONCE(1); 222 222 return PTR_ERR(old); 223 223 } 224 - release_probes(old); 225 224 226 225 if (!tp_funcs) { 227 226 /* Removed last function */ ··· 231 232 static_key_slow_dec(&tp->key); 232 233 } 233 234 rcu_assign_pointer(tp->funcs, tp_funcs); 235 + release_probes(old); 234 236 return 0; 235 237 } 236 238