X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Fsched%2Fact_pedit.c;fp=net%2Fsched%2Fact_pedit.c;h=1742a68e0122a134a9e4430c5e96a762a3f3061a;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=f257475e0e0c996ba39a333f2f7c4386573ed250;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c index f257475e0..1742a68e0 100644 --- a/net/sched/act_pedit.c +++ b/net/sched/act_pedit.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -209,9 +210,10 @@ tcf_pedit_dump(struct sk_buff *skb, struct tc_action *a,int bind, int ref) s = sizeof(*opt) + p->nkeys * sizeof(struct tc_pedit_key); /* netlink spinlocks held above us - must use ATOMIC */ - opt = kzalloc(s, GFP_ATOMIC); + opt = kmalloc(s, GFP_ATOMIC); if (opt == NULL) return -ENOBUFS; + memset(opt, 0, s); memcpy(opt->keys, p->keys, p->nkeys * sizeof(struct tc_pedit_key)); opt->index = p->index;