linux/kernel
Tom Zanussi c4cff064be tracing/filters: clean up filter_add_subsystem_pred()
Impact: cleanup, memory leak fix

This patch cleans up filter_add_subsystem_pred():

- searches for the field before creating a copy of the pred

- fixes memory leak in the case a predicate isn't applied

- if -ENOMEM, makes sure there's no longer a reference to the
  pred so the caller can free the half-finished filter

- changes the confusing i == MAX_FILTER_PRED - 1 comparison
  previously remarked upon

This affects only per-subsystem event filtering.

Signed-off-by: Tom Zanussi <tzanussi@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: =?ISO-8859-1?Q?Fr=E9d=E9ric?= Weisbecker <fweisbec@gmail.com>
LKML-Reference: <1237796808.7527.40.camel@charm-linux>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-03-23 09:30:37 +01:00
..
irq Merge branch 'x86/core' into tracing/textedit 2009-03-06 16:45:01 +01:00
power PM: Split up sysdev_[suspend|resume] from device_power_[down|up] 2009-02-22 10:33:44 -08:00
time
trace tracing/filters: clean up filter_add_subsystem_pred() 2009-03-23 09:30:37 +01:00
.gitignore
acct.c
async.c
audit_tree.c
audit.c
audit.h
auditfilter.c
auditsc.c
backtracetest.c
bounds.c
capability.c
cgroup_debug.c
cgroup_freezer.c
cgroup.c
compat.c
configs.c
cpu.c
cpuset.c
cred-internals.h
cred.c
delayacct.c
dma-coherent.c
dma.c
exec_domain.c
exit.c
extable.c
fork.c Merge branches 'tracing/ftrace', 'tracing/textedit' and 'linus' into tracing/core 2009-03-10 22:54:23 +01:00
freezer.c
futex_compat.c
futex.c
hrtimer.c
itimer.c
kallsyms.c
Kconfig.freezer
Kconfig.hz
Kconfig.preempt
kexec.c Merge branch 'linus' into x86/apic 2009-02-22 20:05:19 +01:00
kfifo.c
kgdb.c
kmod.c
kprobes.c kprobes: Fix locking imbalance in kretprobes 2009-03-18 12:51:16 +01:00
ksysfs.c
kthread.c
latencytop.c
lockdep_internals.h
lockdep_proc.c
lockdep_states.h
lockdep.c Merge branch 'core/locking' into tracing/ftrace 2009-03-13 01:33:21 +01:00
Makefile PM: fix build for CONFIG_PM unset 2009-02-21 14:17:17 -08:00
marker.c
module.c Merge branches 'tracing/ftrace', 'tracing/kprobes', 'tracing/tasks' and 'linus' into tracing/core 2009-03-20 10:14:53 +01:00
mutex-debug.c
mutex-debug.h
mutex.c
mutex.h
notifier.c
ns_cgroup.c
nsproxy.c
panic.c
params.c
pid_namespace.c
pid.c
pm_qos_params.c
posix-cpu-timers.c
posix-timers.c
printk.c PM: Fix suspend_console and resume_console to use only one semaphore 2009-02-21 14:17:18 -08:00
profile.c
ptrace.c
rcuclassic.c rcu: Teach RCU that idle task is not quiscent state at boot 2009-02-26 04:08:14 +01:00
rcupdate.c rcu: Teach RCU that idle task is not quiscent state at boot 2009-02-26 04:08:14 +01:00
rcupreempt_trace.c
rcupreempt.c rcu: Teach RCU that idle task is not quiscent state at boot 2009-02-26 04:08:14 +01:00
rcutorture.c
rcutree_trace.c
rcutree.c rcu: Teach RCU that idle task is not quiscent state at boot 2009-02-26 04:08:14 +01:00
relay.c
res_counter.c
resource.c
rtmutex_common.h
rtmutex-debug.c
rtmutex-debug.h
rtmutex-tester.c
rtmutex.c
rtmutex.h
rwsem.c
sched_clock.c Merge branch 'sched/clock' into tracing/ftrace 2009-02-27 08:35:19 +01:00
sched_cpupri.c
sched_cpupri.h
sched_debug.c
sched_fair.c
sched_features.h
sched_idletask.c
sched_rt.c
sched_stats.h
sched.c Merge branch 'x86/core' into tracing/textedit 2009-03-06 16:45:01 +01:00
seccomp.c x86-64: seccomp: fix 32/64 syscall hole 2009-03-02 15:41:30 -08:00
semaphore.c
signal.c
smp.c
softirq.c softirq: no need to have SOFTIRQ in softirq name 2009-03-13 00:43:33 -04:00
softlockup.c
spinlock.c
srcu.c
stacktrace.c
stop_machine.c alloc_percpu: change percpu_ptr to per_cpu_ptr 2009-02-20 16:29:08 +09:00
sys_ni.c
sys.c sched: don't allow setuid to succeed if the user does not have rt bandwidth 2009-02-27 11:11:53 +01:00
sysctl_check.c
sysctl.c
taskstats.c
test_kprobes.c
time.c
timeconst.pl
timer.c
tracepoint.c tracepoints: dont update zero-sized tracepoint sections 2009-03-18 19:55:00 +01:00
tsacct.c Fix fixpoint divide exception in acct_update_integrals 2009-03-09 08:13:35 -07:00
uid16.c
up.c
user_namespace.c Fix recursive lock in free_uid()/free_user_ns() 2009-02-27 16:26:21 -08:00
user.c kernel/user.c: fix a memory leak when freeing up non-init usernamespaces users 2009-03-10 15:55:11 -07:00
utsname_sysctl.c
utsname.c
wait.c
workqueue.c