All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] openvswitch: add missing resv_start_op initialization for dp_vport_genl_family
@ 2022-10-31  8:12 Ziyang Xuan
  2022-10-31 11:39 ` [ovs-dev] " Ilya Maximets
  2022-10-31 16:40 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 4+ messages in thread
From: Ziyang Xuan @ 2022-10-31  8:12 UTC (permalink / raw)
  To: pshelar, davem, edumazet, kuba, pabeni, netdev, dev; +Cc: linux-kernel

I got a warning using the latest mainline codes to start vms as following:

===================================================
WARNING: CPU: 1 PID: 1 at net/netlink/genetlink.c:383 genl_register_family+0x6c/0x76c
CPU: 1 PID: 1 Comm: swapper/0 Not tainted 6.1.0-rc2-00886-g882ad2a2a8ff #43
...
Call trace:
 genl_register_family+0x6c/0x76c
 dp_init+0xa8/0x124
 do_one_initcall+0x84/0x450

It is because that commit 9c5d03d36251 ("genetlink: start to validate
reserved header bytes") has missed the resv_start_op initialization
for dp_vport_genl_family, and commit ce48ebdd5651 ("genetlink: limit
the use of validation workarounds to old ops") add checking warning.

Add resv_start_op initialization for dp_vport_genl_family to fix it.

Fixes: 9c5d03d36251 ("genetlink: start to validate reserved header bytes")
Signed-off-by: Ziyang Xuan <william.xuanziyang@huawei.com>
---
 net/openvswitch/datapath.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index 155263e73512..8b84869eb2ac 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -2544,6 +2544,7 @@ struct genl_family dp_vport_genl_family __ro_after_init = {
 	.parallel_ops = true,
 	.small_ops = dp_vport_genl_ops,
 	.n_small_ops = ARRAY_SIZE(dp_vport_genl_ops),
+	.resv_start_op = OVS_VPORT_CMD_SET + 1,
 	.mcgrps = &ovs_dp_vport_multicast_group,
 	.n_mcgrps = 1,
 	.module = THIS_MODULE,
-- 
2.25.1


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

* Re: [ovs-dev] [PATCH net] openvswitch: add missing resv_start_op initialization for dp_vport_genl_family
  2022-10-31  8:12 [PATCH net] openvswitch: add missing resv_start_op initialization for dp_vport_genl_family Ziyang Xuan
@ 2022-10-31 11:39 ` Ilya Maximets
  2022-10-31 12:27   ` Ziyang Xuan (William)
  2022-10-31 16:40 ` patchwork-bot+netdevbpf
  1 sibling, 1 reply; 4+ messages in thread
From: Ilya Maximets @ 2022-10-31 11:39 UTC (permalink / raw)
  To: Ziyang Xuan, pshelar, davem, edumazet, kuba, pabeni, netdev, dev
  Cc: linux-kernel, i.maximets

On 10/31/22 09:12, Ziyang Xuan via dev wrote:
> I got a warning using the latest mainline codes to start vms as following:
> 
> ===================================================
> WARNING: CPU: 1 PID: 1 at net/netlink/genetlink.c:383 genl_register_family+0x6c/0x76c
> CPU: 1 PID: 1 Comm: swapper/0 Not tainted 6.1.0-rc2-00886-g882ad2a2a8ff #43
> ...
> Call trace:
>  genl_register_family+0x6c/0x76c
>  dp_init+0xa8/0x124
>  do_one_initcall+0x84/0x450
> 
> It is because that commit 9c5d03d36251 ("genetlink: start to validate
> reserved header bytes") has missed the resv_start_op initialization
> for dp_vport_genl_family, and commit ce48ebdd5651 ("genetlink: limit
> the use of validation workarounds to old ops") add checking warning.
> 
> Add resv_start_op initialization for dp_vport_genl_family to fix it.
> 
> Fixes: 9c5d03d36251 ("genetlink: start to validate reserved header bytes")
> Signed-off-by: Ziyang Xuan <william.xuanziyang@huawei.com>
> ---

Hi, Ziyang Xuan.  Thanks for the patch!

But it looks like Jakub already fixed that issue a couple of days ago:
  https://git.kernel.org/netdev/net/c/e4ba4554209f

Best regards, Ilya Maximets.

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

* Re: [ovs-dev] [PATCH net] openvswitch: add missing resv_start_op initialization for dp_vport_genl_family
  2022-10-31 11:39 ` [ovs-dev] " Ilya Maximets
@ 2022-10-31 12:27   ` Ziyang Xuan (William)
  0 siblings, 0 replies; 4+ messages in thread
From: Ziyang Xuan (William) @ 2022-10-31 12:27 UTC (permalink / raw)
  To: Ilya Maximets, pshelar, davem, edumazet, kuba, pabeni, netdev, dev
  Cc: linux-kernel

> On 10/31/22 09:12, Ziyang Xuan via dev wrote:
>> I got a warning using the latest mainline codes to start vms as following:
>>
>> ===================================================
>> WARNING: CPU: 1 PID: 1 at net/netlink/genetlink.c:383 genl_register_family+0x6c/0x76c
>> CPU: 1 PID: 1 Comm: swapper/0 Not tainted 6.1.0-rc2-00886-g882ad2a2a8ff #43
>> ...
>> Call trace:
>>  genl_register_family+0x6c/0x76c
>>  dp_init+0xa8/0x124
>>  do_one_initcall+0x84/0x450
>>
>> It is because that commit 9c5d03d36251 ("genetlink: start to validate
>> reserved header bytes") has missed the resv_start_op initialization
>> for dp_vport_genl_family, and commit ce48ebdd5651 ("genetlink: limit
>> the use of validation workarounds to old ops") add checking warning.
>>
>> Add resv_start_op initialization for dp_vport_genl_family to fix it.
>>
>> Fixes: 9c5d03d36251 ("genetlink: start to validate reserved header bytes")
>> Signed-off-by: Ziyang Xuan <william.xuanziyang@huawei.com>
>> ---
> 
> Hi, Ziyang Xuan.  Thanks for the patch!
> 
> But it looks like Jakub already fixed that issue a couple of days ago:
>   https://git.kernel.org/netdev/net/c/e4ba4554209f
> 

That's fine. Ignore this.

Thank you.

> Best regards, Ilya Maximets.
> 
> .
> 

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

* Re: [PATCH net] openvswitch: add missing resv_start_op initialization for dp_vport_genl_family
  2022-10-31  8:12 [PATCH net] openvswitch: add missing resv_start_op initialization for dp_vport_genl_family Ziyang Xuan
  2022-10-31 11:39 ` [ovs-dev] " Ilya Maximets
@ 2022-10-31 16:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-10-31 16:40 UTC (permalink / raw)
  To: Ziyang Xuan
  Cc: pshelar, davem, edumazet, kuba, pabeni, netdev, dev, linux-kernel

Hello:

This patch was applied to bpf/bpf.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Mon, 31 Oct 2022 16:12:10 +0800 you wrote:
> I got a warning using the latest mainline codes to start vms as following:
> 
> ===================================================
> WARNING: CPU: 1 PID: 1 at net/netlink/genetlink.c:383 genl_register_family+0x6c/0x76c
> CPU: 1 PID: 1 Comm: swapper/0 Not tainted 6.1.0-rc2-00886-g882ad2a2a8ff #43
> ...
> Call trace:
>  genl_register_family+0x6c/0x76c
>  dp_init+0xa8/0x124
>  do_one_initcall+0x84/0x450
> 
> [...]

Here is the summary with links:
  - [net] openvswitch: add missing resv_start_op initialization for dp_vport_genl_family
    https://git.kernel.org/bpf/bpf/c/e4ba4554209f

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2022-10-31 16:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-31  8:12 [PATCH net] openvswitch: add missing resv_start_op initialization for dp_vport_genl_family Ziyang Xuan
2022-10-31 11:39 ` [ovs-dev] " Ilya Maximets
2022-10-31 12:27   ` Ziyang Xuan (William)
2022-10-31 16:40 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.