Message ID | 20150203141059.GA25454@zenon.in.qult.net |
---|---|
State | RFC, archived |
Delegated to: | David Miller |
Headers | show |
Hi again, After some playing around, I found that my quick-and-dirty fix didn't actually do the job. I eventually traced the problem to come from the fact that tcf_exts_dump_stats() just assumed that the list of actions in exts->actions contains at least one element and accessed it using tcf_exts_first_act(). This is clearly not true in the case of filters with no associated action in particular, as in the case of my "basic" filter. Simply ensuring that the list is not empty beforehand is enough to fix the problem, just as is also done above in tcf_exts_dump(). Ignacy Gawędzki (1): cls_api.c: Fix dumping of non-existing actions' stats. net/sched/cls_api.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/net/sched/act_api.c b/net/sched/act_api.c index 3d43e49..6dd46be 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c @@ -602,7 +602,7 @@ int tcf_action_copy_stats(struct sk_buff *skb, struct tc_action *a, struct tcf_common *p = a->priv; if (p == NULL) - goto errout; + return 0; /* compat_mode being true specifies a call that is supposed