cls_cgroup: Fix oops when user send improperly 'tc filter add' request
[linux-2.6.git] / net / sched / cls_cgroup.c
index cc29b44..e5becb9 100644 (file)
@@ -167,6 +167,9 @@ static int cls_cgroup_change(struct tcf_proto *tp, unsigned long base,
        struct tcf_exts e;
        int err;
 
+       if (!tca[TCA_OPTIONS])
+               return -EINVAL;
+
        if (head == NULL) {
                if (!handle)
                        return -EINVAL;