diff mbox series

[ovs-dev,V4,01/24] datapath: return an error instead of doing BUG_ON()

Message ID 20201012202511.21000-2-gvrose8192@gmail.com
State Accepted
Headers show
Series Add support for Linux kernels up to 5.8.x | expand

Commit Message

Gregory Rose Oct. 12, 2020, 8:24 p.m. UTC
From: Eelco Chaudron <echaudro@redhat.com>

Upstream commit:
    commit a734d1f4c2fc962ef4daa179e216df84a8ec5f84
    Author: Eelco Chaudron <echaudro@redhat.com>
    Date:   Thu May 2 16:12:38 2019 -0400

    net: openvswitch: return an error instead of doing BUG_ON()

    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>
    Acked-by: Flavio Leitner <fbl@sysclose.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Cc: Eelco Chaudron <echaudro@redhat.com>
Acked-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Greg Rose <gvrose8192@gmail.com>
---
 datapath/datapath.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Comments

0-day Robot Oct. 12, 2020, 9:03 p.m. UTC | #1
Bleep bloop.  Greetings Greg Rose, I am a robot and I have tried out your patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


checkpatch:
ERROR: Author Eelco Chaudron <echaudro@redhat.com> needs to sign off.
WARNING: Unexpected sign-offs from developers who are not authors or co-authors or committers: Greg Rose <gvrose8192@gmail.com>
Lines checked: 55, Warnings: 1, Errors: 1


Please check this out.  If you feel there has been an error, please email aconole@redhat.com

Thanks,
0-day Robot
diff mbox series

Patch

diff --git a/datapath/datapath.c b/datapath/datapath.c
index 05c1e4274..d604bfd36 100644
--- a/datapath/datapath.c
+++ b/datapath/datapath.c
@@ -469,7 +469,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,
@@ -486,7 +487,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);
 	}