Revision bce0b6c51ac76fc0e763262a6c2a9d05e486f0d8 authored by Steven Rostedt (Red Hat) on 21 August 2014, 03:57:04 UTC, committed by Steven Rostedt on 22 August 2014, 19:24:12 UTC
Now that a ftrace_hash can be shared by multiple ftrace_ops, they can dec the rec->flags by more than once (one per those that share the ftrace_hash). This means that the tramp_hash may not have a hash item when it was added. For example, if two ftrace_ops share a hash for a ftrace record, and the first ops has a trampoline, when it adds itself it will set the rec->flags TRAMP flag and increments its nr_trampolines counter. When the second ops is added, it must clear that tramp flag but also decrement the other ops that shares its hash. As the update to the function callbacks has not yet been performed, the other ops will not have the tramp hash set yet and it can not be used to know to decrement its nr_trampolines. Luckily, the tramp_hash does not need to be used. As the ftrace_mutex is held, a ops with a trampoline to a record during an update of another ops that shares the record will have its func_hash pointing to it. Since a trampoline can only be set for a record if only one ops is attached to it, we can just check if the record has a trampoline (the FTRACE_FL_TRAMP flag is set) and then find the ops that has this record in its hashes. Also added some output to help debug when things go wrong. Cc: stable@vger.kernel.org # 3.16+ (apply after 3.17-rc4 is out) Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
1 parent 8426191
File | Mode | Size |
---|---|---|
bebob | ||
fireworks | ||
Kconfig | -rw-r--r-- | 3.5 KB |
Makefile | -rw-r--r-- | 519 bytes |
amdtp.c | -rw-r--r-- | 27.0 KB |
amdtp.h | -rw-r--r-- | 8.0 KB |
cmp.c | -rw-r--r-- | 9.3 KB |
cmp.h | -rw-r--r-- | 1.4 KB |
dice-interface.h | -rw-r--r-- | 11.5 KB |
dice.c | -rw-r--r-- | 36.5 KB |
fcp.c | -rw-r--r-- | 10.3 KB |
fcp.h | -rw-r--r-- | 1.0 KB |
isight.c | -rw-r--r-- | 17.8 KB |
iso-resources.c | -rw-r--r-- | 6.5 KB |
iso-resources.h | -rw-r--r-- | 1.2 KB |
lib.c | -rw-r--r-- | 2.1 KB |
lib.h | -rw-r--r-- | 592 bytes |
packets-buffer.c | -rw-r--r-- | 2.1 KB |
packets-buffer.h | -rw-r--r-- | 747 bytes |
scs1x.c | -rw-r--r-- | 12.7 KB |
speakers.c | -rw-r--r-- | 18.8 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...