Loading net/sched/cls_flower.c +10 −16 Original line number Original line Diff line number Diff line Loading @@ -865,7 +865,6 @@ static int fl_change(struct net *net, struct sk_buff *in_skb, struct cls_fl_filter *fnew; struct cls_fl_filter *fnew; struct nlattr **tb; struct nlattr **tb; struct fl_flow_mask mask = {}; struct fl_flow_mask mask = {}; unsigned long idr_index; int err; int err; if (!tca[TCA_OPTIONS]) if (!tca[TCA_OPTIONS]) Loading Loading @@ -896,21 +895,17 @@ static int fl_change(struct net *net, struct sk_buff *in_skb, goto errout; goto errout; if (!handle) { if (!handle) { err = idr_alloc_ext(&head->handle_idr, fnew, &idr_index, handle = 1; 1, 0x80000000, GFP_KERNEL); err = idr_alloc_u32(&head->handle_idr, fnew, &handle, if (err) INT_MAX, GFP_KERNEL); goto errout; } else if (!fold) { fnew->handle = idr_index; } /* user specifies a handle and it doesn't exist */ /* user specifies a handle and it doesn't exist */ if (handle && !fold) { err = idr_alloc_u32(&head->handle_idr, fnew, &handle, err = idr_alloc_ext(&head->handle_idr, fnew, &idr_index, handle, GFP_KERNEL); handle, handle + 1, GFP_KERNEL); } if (err) if (err) goto errout; goto errout; fnew->handle = idr_index; fnew->handle = handle; } if (tb[TCA_FLOWER_FLAGS]) { if (tb[TCA_FLOWER_FLAGS]) { fnew->flags = nla_get_u32(tb[TCA_FLOWER_FLAGS]); fnew->flags = nla_get_u32(tb[TCA_FLOWER_FLAGS]); Loading Loading @@ -966,7 +961,6 @@ static int fl_change(struct net *net, struct sk_buff *in_skb, *arg = fnew; *arg = fnew; if (fold) { if (fold) { fnew->handle = handle; idr_replace(&head->handle_idr, fnew, fnew->handle); idr_replace(&head->handle_idr, fnew, fnew->handle); list_replace_rcu(&fold->list, &fnew->list); list_replace_rcu(&fold->list, &fnew->list); tcf_unbind_filter(tp, &fold->res); tcf_unbind_filter(tp, &fold->res); Loading Loading
net/sched/cls_flower.c +10 −16 Original line number Original line Diff line number Diff line Loading @@ -865,7 +865,6 @@ static int fl_change(struct net *net, struct sk_buff *in_skb, struct cls_fl_filter *fnew; struct cls_fl_filter *fnew; struct nlattr **tb; struct nlattr **tb; struct fl_flow_mask mask = {}; struct fl_flow_mask mask = {}; unsigned long idr_index; int err; int err; if (!tca[TCA_OPTIONS]) if (!tca[TCA_OPTIONS]) Loading Loading @@ -896,21 +895,17 @@ static int fl_change(struct net *net, struct sk_buff *in_skb, goto errout; goto errout; if (!handle) { if (!handle) { err = idr_alloc_ext(&head->handle_idr, fnew, &idr_index, handle = 1; 1, 0x80000000, GFP_KERNEL); err = idr_alloc_u32(&head->handle_idr, fnew, &handle, if (err) INT_MAX, GFP_KERNEL); goto errout; } else if (!fold) { fnew->handle = idr_index; } /* user specifies a handle and it doesn't exist */ /* user specifies a handle and it doesn't exist */ if (handle && !fold) { err = idr_alloc_u32(&head->handle_idr, fnew, &handle, err = idr_alloc_ext(&head->handle_idr, fnew, &idr_index, handle, GFP_KERNEL); handle, handle + 1, GFP_KERNEL); } if (err) if (err) goto errout; goto errout; fnew->handle = idr_index; fnew->handle = handle; } if (tb[TCA_FLOWER_FLAGS]) { if (tb[TCA_FLOWER_FLAGS]) { fnew->flags = nla_get_u32(tb[TCA_FLOWER_FLAGS]); fnew->flags = nla_get_u32(tb[TCA_FLOWER_FLAGS]); Loading Loading @@ -966,7 +961,6 @@ static int fl_change(struct net *net, struct sk_buff *in_skb, *arg = fnew; *arg = fnew; if (fold) { if (fold) { fnew->handle = handle; idr_replace(&head->handle_idr, fnew, fnew->handle); idr_replace(&head->handle_idr, fnew, fnew->handle); list_replace_rcu(&fold->list, &fnew->list); list_replace_rcu(&fold->list, &fnew->list); tcf_unbind_filter(tp, &fold->res); tcf_unbind_filter(tp, &fold->res); Loading