[ovs-dev,2/5] datapath: change type of UPCALL_PID attribute to NLA_UNSPEC
diff mbox series

Message ID 1570656134-11957-3-git-send-email-gvrose8192@gmail.com
State New
Headers show
Series
  • Backport upstream Linux kernel patches
Related show

Commit Message

Gregory Rose Oct. 9, 2019, 9:22 p.m. UTC
From: Li RongQing <lirongqing@baidu.com>

Upstream commit:
    commit ea8564c865299815095bebeb4b25bef474218e4c
    Author: Li RongQing <lirongqing@baidu.com>
    Date:   Tue Sep 24 19:11:52 2019 +0800

    openvswitch: change type of UPCALL_PID attribute to NLA_UNSPEC

    userspace openvswitch patch "(dpif-linux: Implement the API
    functions to allow multiple handler threads read upcall)"
    changes its type from U32 to UNSPEC, but leave the kernel
    unchanged

    and after kernel 6e237d099fac "(netlink: Relax attr validation
    for fixed length types)", this bug is exposed by the below
    warning

    	[   57.215841] netlink: 'ovs-vswitchd': attribute type 5 has an invalid length.

    Fixes: 5cd667b0a456 ("openvswitch: Allow each vport to have an array of 'port_id's")
    Signed-off-by: Li RongQing <lirongqing@baidu.com>
    Acked-by: Pravin B Shelar <pshelar@ovn.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Fixes: beb1c69a3 ("datapath: Allow each vport to have an array of 'port_id's.")
Cc: Li RongQing <lirongqing@baidu.com>
Signed-off-by: Greg Rose <gvrose8192@gmail.com>
---
 datapath/datapath.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

0-day Robot Oct. 9, 2019, 10:02 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 Li RongQing <lirongqing@baidu.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: 51, 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
Yi-Hung Wei Oct. 15, 2019, 6:07 p.m. UTC | #2
On Wed, Oct 9, 2019 at 2:24 PM Greg Rose <gvrose8192@gmail.com> wrote:
>
> From: Li RongQing <lirongqing@baidu.com>
>
> Upstream commit:
>     commit ea8564c865299815095bebeb4b25bef474218e4c
>     Author: Li RongQing <lirongqing@baidu.com>
>     Date:   Tue Sep 24 19:11:52 2019 +0800
>
>     openvswitch: change type of UPCALL_PID attribute to NLA_UNSPEC
>
>     userspace openvswitch patch "(dpif-linux: Implement the API
>     functions to allow multiple handler threads read upcall)"
>     changes its type from U32 to UNSPEC, but leave the kernel
>     unchanged
>
>     and after kernel 6e237d099fac "(netlink: Relax attr validation
>     for fixed length types)", this bug is exposed by the below
>     warning
>
>         [   57.215841] netlink: 'ovs-vswitchd': attribute type 5 has an invalid length.
>
>     Fixes: 5cd667b0a456 ("openvswitch: Allow each vport to have an array of 'port_id's")
>     Signed-off-by: Li RongQing <lirongqing@baidu.com>
>     Acked-by: Pravin B Shelar <pshelar@ovn.org>
>     Signed-off-by: David S. Miller <davem@davemloft.net>
>
> Fixes: beb1c69a3 ("datapath: Allow each vport to have an array of 'port_id's.")
> Cc: Li RongQing <lirongqing@baidu.com>
> Signed-off-by: Greg Rose <gvrose8192@gmail.com>
> ---
LGTM.

Acked-by: Yi-Hung Wei <yihung.wei@gmail.com>

Patch
diff mbox series

diff --git a/datapath/datapath.c b/datapath/datapath.c
index 15af156..a787276 100644
--- a/datapath/datapath.c
+++ b/datapath/datapath.c
@@ -2269,7 +2269,7 @@  static const struct nla_policy vport_policy[OVS_VPORT_ATTR_MAX + 1] = {
 	[OVS_VPORT_ATTR_STATS] = { .len = sizeof(struct ovs_vport_stats) },
 	[OVS_VPORT_ATTR_PORT_NO] = { .type = NLA_U32 },
 	[OVS_VPORT_ATTR_TYPE] = { .type = NLA_U32 },
-	[OVS_VPORT_ATTR_UPCALL_PID] = { .type = NLA_U32 },
+	[OVS_VPORT_ATTR_UPCALL_PID] = { .type = NLA_UNSPEC },
 	[OVS_VPORT_ATTR_OPTIONS] = { .type = NLA_NESTED },
 	[OVS_VPORT_ATTR_IFINDEX] = { .type = NLA_U32 },
 	[OVS_VPORT_ATTR_NETNSID] = { .type = NLA_S32 },