netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] openvswitch: change type of UPCALL_PID attribute to NLA_UNSPEC
@ 2019-09-24 11:11 Li RongQing
  2019-09-25 21:02 ` Pravin Shelar
  2019-09-26  7:33 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Li RongQing @ 2019-09-24 11:11 UTC (permalink / raw)
  To: netdev, pshelar

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.

Signed-off-by: Li RongQing <lirongqing@baidu.com>
---
 net/openvswitch/datapath.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index dde9d762edee..f30e406fbec5 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -2294,7 +2294,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 },
-- 
2.16.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] openvswitch: change type of UPCALL_PID attribute to NLA_UNSPEC
  2019-09-24 11:11 [PATCH] openvswitch: change type of UPCALL_PID attribute to NLA_UNSPEC Li RongQing
@ 2019-09-25 21:02 ` Pravin Shelar
  2019-09-26  1:15   ` 答复: " Li,Rongqing
  2019-09-26  7:33 ` David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Pravin Shelar @ 2019-09-25 21:02 UTC (permalink / raw)
  To: Li RongQing; +Cc: Linux Kernel Network Developers

On Tue, Sep 24, 2019 at 4:11 AM Li RongQing <lirongqing@baidu.com> wrote:
>
> 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.
>
> Signed-off-by: Li RongQing <lirongqing@baidu.com>

Acked-by: Pravin B Shelar <pshelar@ovn.org>

Thanks,
Pravin.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* 答复: [PATCH] openvswitch: change type of UPCALL_PID attribute to NLA_UNSPEC
  2019-09-25 21:02 ` Pravin Shelar
@ 2019-09-26  1:15   ` Li,Rongqing
  0 siblings, 0 replies; 4+ messages in thread
From: Li,Rongqing @ 2019-09-26  1:15 UTC (permalink / raw)
  To: Pravin Shelar; +Cc: Linux Kernel Network Developers



> -----邮件原件-----
> 发件人: Pravin Shelar [mailto:pshelar@ovn.org]
> 发送时间: 2019年9月26日 5:03
> 收件人: Li,Rongqing <lirongqing@baidu.com>
> 抄送: Linux Kernel Network Developers <netdev@vger.kernel.org>
> 主题: Re: [PATCH] openvswitch: change type of UPCALL_PID attribute to
> NLA_UNSPEC
> 
> On Tue, Sep 24, 2019 at 4:11 AM Li RongQing <lirongqing@baidu.com> wrote:
> >
> > 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.
> >
> > Signed-off-by: Li RongQing <lirongqing@baidu.com>
> 
> Acked-by: Pravin B Shelar <pshelar@ovn.org>
> 

Add a fixes:

Fixes: 5cd667b0a456 ("openvswitch: Allow each vport to have an array of 'port_id's")

-LI

> Thanks,
> Pravin.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] openvswitch: change type of UPCALL_PID attribute to NLA_UNSPEC
  2019-09-24 11:11 [PATCH] openvswitch: change type of UPCALL_PID attribute to NLA_UNSPEC Li RongQing
  2019-09-25 21:02 ` Pravin Shelar
@ 2019-09-26  7:33 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2019-09-26  7:33 UTC (permalink / raw)
  To: lirongqing; +Cc: netdev, pshelar

From: Li RongQing <lirongqing@baidu.com>
Date: Tue, 24 Sep 2019 19:11:52 +0800

> 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.
> 
> Signed-off-by: Li RongQing <lirongqing@baidu.com>

Applied, and queued up for -stable, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-09-26  7:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-24 11:11 [PATCH] openvswitch: change type of UPCALL_PID attribute to NLA_UNSPEC Li RongQing
2019-09-25 21:02 ` Pravin Shelar
2019-09-26  1:15   ` 答复: " Li,Rongqing
2019-09-26  7:33 ` 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).