net, sched: fix soft lockup in tc_classify
[firefly-linux-kernel-4.4.55.git] / net / sched / cls_api.c
index ecc1904e454f052d58a1d121c35a3a07aa1c6a48..20b2f867c5a13b3b6a836f39d4805187e39be407 100644 (file)
@@ -137,13 +137,15 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n)
        unsigned long cl;
        unsigned long fh;
        int err;
-       int tp_created = 0;
+       int tp_created;
 
        if ((n->nlmsg_type != RTM_GETTFILTER) &&
            !netlink_ns_capable(skb, net->user_ns, CAP_NET_ADMIN))
                return -EPERM;
 
 replay:
+       tp_created = 0;
+
        err = nlmsg_parse(n, sizeof(*t), tca, TCA_MAX, NULL);
        if (err < 0)
                return err;