aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/act_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/act_api.c')
-rw-r--r--net/sched/act_api.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index 93fdf131bd75..5cfb160df063 100644
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -127,7 +127,8 @@ static int tcf_del_walker(struct sk_buff *skb, struct tc_action *a,
127 nest = nla_nest_start(skb, a->order); 127 nest = nla_nest_start(skb, a->order);
128 if (nest == NULL) 128 if (nest == NULL)
129 goto nla_put_failure; 129 goto nla_put_failure;
130 NLA_PUT_STRING(skb, TCA_KIND, a->ops->kind); 130 if (nla_put_string(skb, TCA_KIND, a->ops->kind))
131 goto nla_put_failure;
131 for (i = 0; i < (hinfo->hmask + 1); i++) { 132 for (i = 0; i < (hinfo->hmask + 1); i++) {
132 p = hinfo->htab[tcf_hash(i, hinfo->hmask)]; 133 p = hinfo->htab[tcf_hash(i, hinfo->hmask)];
133 134
@@ -139,7 +140,8 @@ static int tcf_del_walker(struct sk_buff *skb, struct tc_action *a,
139 p = s_p; 140 p = s_p;
140 } 141 }
141 } 142 }
142 NLA_PUT_U32(skb, TCA_FCNT, n_i); 143 if (nla_put_u32(skb, TCA_FCNT, n_i))
144 goto nla_put_failure;
143 nla_nest_end(skb, nest); 145 nla_nest_end(skb, nest);
144 146
145 return n_i; 147 return n_i;
@@ -437,7 +439,8 @@ tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int bind, int ref)
437 if (a->ops == NULL || a->ops->dump == NULL) 439 if (a->ops == NULL || a->ops->dump == NULL)
438 return err; 440 return err;
439 441
440 NLA_PUT_STRING(skb, TCA_KIND, a->ops->kind); 442 if (nla_put_string(skb, TCA_KIND, a->ops->kind))
443 goto nla_put_failure;
441 if (tcf_action_copy_stats(skb, a, 0)) 444 if (tcf_action_copy_stats(skb, a, 0))
442 goto nla_put_failure; 445 goto nla_put_failure;
443 nest = nla_nest_start(skb, TCA_OPTIONS); 446 nest = nla_nest_start(skb, TCA_OPTIONS);