[net] openvswitch: add missing resv_start_op initialization for dp_vport_genl_family
Message ID | 20221031081210.2852708-1-william.xuanziyang@huawei.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2180608wru; Mon, 31 Oct 2022 01:24:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5wgj8bCP1vIh7sdeYNbd1qPjUxyOqCKGsAwL2Ui8bvjln0wkxQcozWVEVIKjC0zCETXuV3 X-Received: by 2002:a17:906:58c6:b0:78d:b37f:5ce5 with SMTP id e6-20020a17090658c600b0078db37f5ce5mr12163296ejs.707.1667204662044; Mon, 31 Oct 2022 01:24:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667204662; cv=none; d=google.com; s=arc-20160816; b=LU456blz+OXgRLUN9htd5bHrLPLfLJ6Pz8D9vjl9kq42rmyMWyr/qwJYfa22a2trY3 asUHOeLX98rsdNodZfQn8TVE+DCpfqzBAZ9q2sPwgtiHtjcDWtow+UVauSUrG8wl5vaM 1CVy4UYRflDFJzv1viicK3NCO/gM8ajxDGAQd+2GooG4+TEKyKAwhtxKkcGtT6bDmUq+ FGqIrd7iKLIPvDTa/kgJXrL96yCOm9zfsjXg+ctyGDrbYf9oI7gA+aPjbGnw10op85fn Wx1iq1JbztHdWl8k7vV/ToK9OC3A/OItSF0aYAosqz07IRU7WI6mnsslAYCQk/9xJZ+m qcyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Werjk27SpnhllsNOW0wUjokYs7G3P0j3nsQphoX3BOc=; b=fUlyrsbGmASjtpttbaFztOwep0RF9xYk3Il4x1KZlW4dNVWJrl34TslqhdRJN/hSoi XMTZUPW3IGFR/6NIBBszs35/t9QCE8y3x+6aYZm1+7YzFjoIF8ZJO2DYR+oAXFqMmCMi xHUTr73a2kiot0MLEGHRfE2QkJBGbmM7d1B4o7e/uRKY23OgKzmIpaQVmnLRQTLjXnkA 7sXMilyxK1heSeDPriRGbQvpkH8ykXQOs6tPHelhBG2PwR1UlQTy6eZEc3V9Rt4RWIjR jQZrOnRlxCNQ5nl19TTPOmxAEJRhwGpZBViXbdkrSo7RQatfCFM0rp0U7Jq8sEMcr07d aWfg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jg6-20020a170907970600b0078d85777c4fsi8496159ejc.700.2022.10.31.01.23.57; Mon, 31 Oct 2022 01:24:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229779AbiJaIMS (ORCPT <rfc822;kartikey406@gmail.com> + 99 others); Mon, 31 Oct 2022 04:12:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229494AbiJaIMR (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 31 Oct 2022 04:12:17 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C14C9764D; Mon, 31 Oct 2022 01:12:15 -0700 (PDT) Received: from canpemm500006.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4N15Q274sxzpW59; Mon, 31 Oct 2022 16:08:42 +0800 (CST) Received: from localhost.localdomain (10.175.104.82) by canpemm500006.china.huawei.com (7.192.105.130) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 31 Oct 2022 16:12:13 +0800 From: Ziyang Xuan <william.xuanziyang@huawei.com> To: <pshelar@ovn.org>, <davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>, <netdev@vger.kernel.org>, <dev@openvswitch.org> CC: <linux-kernel@vger.kernel.org> Subject: [PATCH net] openvswitch: add missing resv_start_op initialization for dp_vport_genl_family Date: Mon, 31 Oct 2022 16:12:10 +0800 Message-ID: <20221031081210.2852708-1-william.xuanziyang@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.104.82] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To canpemm500006.china.huawei.com (7.192.105.130) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748190795840537842?= X-GMAIL-MSGID: =?utf-8?q?1748190795840537842?= |
Series |
[net] openvswitch: add missing resv_start_op initialization for dp_vport_genl_family
|
|
Commit Message
Ziyang Xuan
Oct. 31, 2022, 8:12 a.m. UTC
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(+)
Comments
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.
> 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. > > . >
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!
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,