projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bd3f022
)
tracing/filters: Don't use pred on alloc failure
author
Tom Zanussi
<
[email protected]
>
Sat, 8 Aug 2009 15:49:09 +0000
(10:49 -0500)
committer
Ingo Molnar
<
[email protected]
>
Sat, 8 Aug 2009 15:55:34 +0000
(17:55 +0200)
Dan Carpenter sent me a fix to prevent pred from being used if
it couldn't be allocated. I noticed the same problem also
existed for the create_pred() case and added a fix for that.
Reported-by: Dan Carpenter <
[email protected]
>
Signed-off-by: Tom Zanussi <
[email protected]
>
Cc: Steven Rostedt <
[email protected]
>
Cc: Frederic Weisbecker <
[email protected]
>
Cc: Li Zefan <
[email protected]
>
LKML-Reference: <
1249746549
.6453.29.camel@tropicana>
Signed-off-by: Ingo Molnar <
[email protected]
>
kernel/trace/trace_events_filter.c
patch
|
blob
|
history
diff --git
a/kernel/trace/trace_events_filter.c
b/kernel/trace/trace_events_filter.c
index 936c621bbf462395cc7f814cd6bbe01d7c841514..1557148be34bb5a479d30c174a5f21655fa57489 100644
(file)
--- a/
kernel/trace/trace_events_filter.c
+++ b/
kernel/trace/trace_events_filter.c
@@
-1029,6
+1029,8
@@
static int replace_preds(struct event_subsystem *system,
if (elt->op == OP_AND || elt->op == OP_OR) {
pred = create_logical_pred(elt->op);
+ if (!pred)
+ return -ENOMEM;
if (call) {
err = filter_add_pred(ps, call, pred);
filter_free_pred(pred);
@@
-1048,6
+1050,8
@@
static int replace_preds(struct event_subsystem *system,
}
pred = create_pred(elt->op, operand1, operand2);
+ if (!pred)
+ return -ENOMEM;
if (call) {
err = filter_add_pred(ps, call, pred);
filter_free_pred(pred);