]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/sched/cls_cgroup.c
net: sched: cls: use nla_nest_cancel instead of nlmsg_trim
[karo-tx-linux.git] / net / sched / cls_cgroup.c
index 741bfa7debb2e60c03c0c95162dae57d15463d6a..221697ab0247c5e786c70e181a43c1145a30748b 100644 (file)
@@ -177,7 +177,6 @@ static int cls_cgroup_dump(struct net *net, struct tcf_proto *tp, unsigned long
                           struct sk_buff *skb, struct tcmsg *t)
 {
        struct cls_cgroup_head *head = rtnl_dereference(tp->root);
-       unsigned char *b = skb_tail_pointer(skb);
        struct nlattr *nest;
 
        t->tcm_handle = head->handle;
@@ -198,7 +197,7 @@ static int cls_cgroup_dump(struct net *net, struct tcf_proto *tp, unsigned long
        return skb->len;
 
 nla_put_failure:
-       nlmsg_trim(skb, b);
+       nla_nest_cancel(skb, nest);
        return -1;
 }