diff options
Diffstat (limited to 'net/sched/act_pedit.c')
-rw-r--r-- | net/sched/act_pedit.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c index 58b3a8652042..f257475e0e0c 100644 --- a/net/sched/act_pedit.c +++ b/net/sched/act_pedit.c | |||
@@ -209,10 +209,9 @@ tcf_pedit_dump(struct sk_buff *skb, struct tc_action *a,int bind, int ref) | |||
209 | s = sizeof(*opt) + p->nkeys * sizeof(struct tc_pedit_key); | 209 | s = sizeof(*opt) + p->nkeys * sizeof(struct tc_pedit_key); |
210 | 210 | ||
211 | /* netlink spinlocks held above us - must use ATOMIC */ | 211 | /* netlink spinlocks held above us - must use ATOMIC */ |
212 | opt = kmalloc(s, GFP_ATOMIC); | 212 | opt = kzalloc(s, GFP_ATOMIC); |
213 | if (opt == NULL) | 213 | if (opt == NULL) |
214 | return -ENOBUFS; | 214 | return -ENOBUFS; |
215 | memset(opt, 0, s); | ||
216 | 215 | ||
217 | memcpy(opt->keys, p->keys, p->nkeys * sizeof(struct tc_pedit_key)); | 216 | memcpy(opt->keys, p->keys, p->nkeys * sizeof(struct tc_pedit_key)); |
218 | opt->index = p->index; | 217 | opt->index = p->index; |