提交 6eef3801 编写于 作者: J Jakub Kicinski 提交者: David S. Miller

net: cls_u32: catch all hardware offload errors

Errors reported by u32_replace_hw_hnode() were not propagated.
Signed-off-by: NJakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: NSridhar Samudrala <sridhar.samudrala@intel.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 3497ed8c
......@@ -922,11 +922,17 @@ static int u32_change(struct net *net, struct sk_buff *in_skb,
ht->divisor = divisor;
ht->handle = handle;
ht->prio = tp->prio;
err = u32_replace_hw_hnode(tp, ht, flags);
if (err) {
kfree(ht);
return err;
}
RCU_INIT_POINTER(ht->next, tp_c->hlist);
rcu_assign_pointer(tp_c->hlist, ht);
*arg = (unsigned long)ht;
u32_replace_hw_hnode(tp, ht, flags);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册