* [PATCH net-next] net: openvswitch: return an error instead of doing BUG_ON()
@ 2019-05-02 20:12 Eelco Chaudron
2019-05-02 20:25 ` [ovs-dev] " Flavio Leitner
2019-05-04 5:37 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Eelco Chaudron @ 2019-05-02 20:12 UTC (permalink / raw)
To: netdev; +Cc: pshelar, davem, dev
For all other error cases in queue_userspace_packet() the error is
returned, so it makes sense to do the same for these two error cases.
Reported-by: Davide Caratti <dcaratti@redhat.com>
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
---
net/openvswitch/datapath.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index b95015c..dc9ff93 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -455,7 +455,8 @@ static int queue_userspace_packet(struct datapath *dp, struct sk_buff *skb,
upcall->dp_ifindex = dp_ifindex;
err = ovs_nla_put_key(key, key, OVS_PACKET_ATTR_KEY, false, user_skb);
- BUG_ON(err);
+ if (err)
+ goto out;
if (upcall_info->userdata)
__nla_put(user_skb, OVS_PACKET_ATTR_USERDATA,
@@ -471,7 +472,9 @@ static int queue_userspace_packet(struct datapath *dp, struct sk_buff *skb,
}
err = ovs_nla_put_tunnel_info(user_skb,
upcall_info->egress_tun_info);
- BUG_ON(err);
+ if (err)
+ goto out;
+
nla_nest_end(user_skb, nla);
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [ovs-dev] [PATCH net-next] net: openvswitch: return an error instead of doing BUG_ON()
2019-05-02 20:12 [PATCH net-next] net: openvswitch: return an error instead of doing BUG_ON() Eelco Chaudron
@ 2019-05-02 20:25 ` Flavio Leitner
2019-05-04 5:37 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Flavio Leitner @ 2019-05-02 20:25 UTC (permalink / raw)
To: Eelco Chaudron; +Cc: netdev, dev, davem
On Thu, May 02, 2019 at 04:12:38PM -0400, Eelco Chaudron wrote:
> For all other error cases in queue_userspace_packet() the error is
> returned, so it makes sense to do the same for these two error cases.
>
> Reported-by: Davide Caratti <dcaratti@redhat.com>
> Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
> ---
LGTM
Acked-by: Flavio Leitner <fbl@sysclose.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: openvswitch: return an error instead of doing BUG_ON()
2019-05-02 20:12 [PATCH net-next] net: openvswitch: return an error instead of doing BUG_ON() Eelco Chaudron
2019-05-02 20:25 ` [ovs-dev] " Flavio Leitner
@ 2019-05-04 5:37 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2019-05-04 5:37 UTC (permalink / raw)
To: echaudro; +Cc: netdev, pshelar, dev
From: Eelco Chaudron <echaudro@redhat.com>
Date: Thu, 2 May 2019 16:12:38 -0400
> For all other error cases in queue_userspace_packet() the error is
> returned, so it makes sense to do the same for these two error cases.
>
> Reported-by: Davide Caratti <dcaratti@redhat.com>
> Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-05-04 5:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-02 20:12 [PATCH net-next] net: openvswitch: return an error instead of doing BUG_ON() Eelco Chaudron
2019-05-02 20:25 ` [ovs-dev] " Flavio Leitner
2019-05-04 5:37 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).