diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index cb2968b975a381899ababe5a43478f8c8a12ee32..aa829be08d601074e5026dcc559e7b8cfd3bfaf5 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c @@ -879,7 +879,10 @@ static struct sk_buff *ovs_flow_cmd_build_info(const struct sw_flow *flow, retval = ovs_flow_cmd_fill_info(flow, dp_ifindex, skb, info->snd_portid, info->snd_seq, 0, cmd, ufid_flags); - BUG_ON(retval < 0); + if (WARN_ON_ONCE(retval < 0)) { + kfree_skb(skb); + skb = ERR_PTR(retval); + } return skb; }