projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
18a0c23
)
[PKT_SCHED]: Correctly handle empty ematch trees
author
Thomas Graf
<tgraf@suug.ch>
Tue, 8 Nov 2005 17:39:17 +0000
(09:39 -0800)
committer
David S. Miller
<davem@davemloft.net>
Tue, 8 Nov 2005 17:39:17 +0000
(09:39 -0800)
Fixes an invalid memory reference when the basic classifier
is used without any ematches but just actions.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/ematch.c
patch
|
blob
|
blame
|
history
diff --git
a/net/sched/ematch.c
b/net/sched/ematch.c
index ebfe2e7d21bdff98494baf479c2cca37c4175b99..64b047c65568cafe0912b92f7bb18b7e56031c25 100644
(file)
--- a/
net/sched/ematch.c
+++ b/
net/sched/ematch.c
@@
-298,6
+298,11
@@
int tcf_em_tree_validate(struct tcf_proto *tp, struct rtattr *rta,
struct tcf_ematch_tree_hdr *tree_hdr;
struct tcf_ematch *em;
+ if (!rta) {
+ memset(tree, 0, sizeof(*tree));
+ return 0;
+ }
+
if (rtattr_parse_nested(tb, TCA_EMATCH_TREE_MAX, rta) < 0)
goto errout;