Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp324566rwi; Mon, 31 Oct 2022 01:40:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM48r9WmECgUPrW9WEniQ/xr7WBY7wMwEISAse9OoggJIwF9aYlhvOaGD0dQRf5PNvYoPKXG X-Received: by 2002:a17:90b:1bd2:b0:212:cf30:3d53 with SMTP id oa18-20020a17090b1bd200b00212cf303d53mr30425719pjb.18.1667205630689; Mon, 31 Oct 2022 01:40:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667205630; cv=none; d=google.com; s=arc-20160816; b=iDzs/C55EJUuaUtcMQj+00l6tXYXAcZuhSu9hg4PhI4/hmMKj4AcbH3OAiMp+kV67f D/jnhP3O5/GA6MJlU2eqj3UqpSgry6eyfAD3w6AoU6OGQFuZqHl0FOk+GNCOrzSDl26c lchSo+BAdEZtG8JQqussrP+ie6oOh9ak/qf+Y1ImEUUfl2aJVAvQDpJ3Zi+CznAaXNy1 uPaY0jF+rpNLBYtKbVFuBpVy9lyK79ZUY79V3vLF/k5e9LTrWrpeI5EPAZcHvSrKOnFp fkNSClO3D8G99rdM3GcsqFujnqu7VzBHcjncqv0GRV7GvuSeefAPLHldEFalsyZ38wia 73bg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n6-20020a654cc6000000b004639c67961dsi8925643pgt.268.2022.10.31.01.40.18; Mon, 31 Oct 2022 01:40:30 -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 + 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 ); 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 To: , , , , , , CC: 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: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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