Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1255119imw; Tue, 5 Jul 2022 06:30:47 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vlCLrgS6AeFDKNhHlhxtKfXQdYn0/11IdtEicUx7khkZmLEuUew6veAnFzw08WpqBsmNPk X-Received: by 2002:a17:907:d89:b0:726:9d87:e4c0 with SMTP id go9-20020a1709070d8900b007269d87e4c0mr33742644ejc.216.1657027846940; Tue, 05 Jul 2022 06:30:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657027846; cv=none; d=google.com; s=arc-20160816; b=aqEAgQ4wYyuEfgKR/5bUxa2ibLplyrlohGhPCx7n3iyip2qIhS//sqfC7ntMcngfVA 2PgOkP4iaHIB2E84lHjRctSr78xrL9AvZZeEAvwtJlhT7aIW8zcFBBaKB9HMHN/oqtws Ev1d6wjlALOhcau7t4inGya8cQFFZvqLYpv1JNpZ3sMqOt+Luv/DbPFLcWX6KG03rqPl /N5SwsU4IAaeVTDGlTfT3V/UjvLpo7J1mSo+PopUjQU22lppAj9iTgZBobeuk1LXzsLG LE7e1xP2Go+Sj7XQNB8w/qSW6jZy03PjcOTFi/BPcKJVUZFBOmFQDqEhpMnye0aRLsGi OaRA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=6N+yNazoPe/MpGVEiDSw8n9aRe2WVrcN2xYqZzJw/ig=; b=ITSyFLX0Svm6NlX1KXJxQRL8C/0pRC2nl+hYtnX+aSj2aI7ooRMbPhGNENPX3msVYt U4DM+TWyP2Pbb+JDvzngJg4W+4XGa34Tn6qjqGkwTInhWSP+Iim7KoqKhOlJomNXoXcI AIO+5F9LJopvQq/xoCGouiSrdwZDulDwMHY2SlFepvxKYD5sqNNCTSJR3tTkJ5c+N6vz cp63vfvs+lk37IMvxwJ5ZoDaMjgpaOL6qVBAqat5GLTSC6D0AhIIyqXGjtjuSqzJzQqF Qv6vyJq8KacNyp3wYZTZz8RvhIX5RWSfnEW3MoqZSw7wig2wzZfJDocB968gIhvRFDRy C0EA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=J9gr7FLB; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fd2-20020a056402388200b0043a6b47edccsi5708129edb.116.2022.07.05.06.30.21; Tue, 05 Jul 2022 06:30:46 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=J9gr7FLB; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233162AbiGEMBn (ORCPT + 99 others); Tue, 5 Jul 2022 08:01:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232999AbiGEMAs (ORCPT ); Tue, 5 Jul 2022 08:00:48 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3427318376; Tue, 5 Jul 2022 05:00:48 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C6527617B9; Tue, 5 Jul 2022 12:00:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D4AA5C341C7; Tue, 5 Jul 2022 12:00:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1657022447; bh=onAYcPnbBE6j4IvOJKB4XBG4btFllbiMF11hZ6/oNsw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J9gr7FLBgtp+RpopTzRhDfRQaLRq1v4RUsFsUl6lpbA5c/c0esqWu4Ts7mtLW0EwV H11rLyBHOT7mBOAPZ32eoX4SXvedvUTf/kP9DQU3xTsQm1c4uhc0ROd960cU4Ielmx QjqY3Q6kuJeCjUCUoQiVoH+wvmlAocvFREPQic18= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , YueHaibing , Jakub Kicinski Subject: [PATCH 4.14 10/29] net: ipv6: unexport __init-annotated seg6_hmac_net_init() Date: Tue, 5 Jul 2022 13:57:58 +0200 Message-Id: <20220705115606.647493871@linuxfoundation.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220705115606.333669144@linuxfoundation.org> References: <20220705115606.333669144@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 From: YueHaibing commit 53ad46169fe2996fe1b623ba6c9c4fa33847876f upstream. As of commit 5801f064e351 ("net: ipv6: unexport __init-annotated seg6_hmac_init()"), EXPORT_SYMBOL and __init is a bad combination because the .init.text section is freed up after the initialization. Hence, modules cannot use symbols annotated __init. The access to a freed symbol may end up with kernel panic. This remove the EXPORT_SYMBOL to fix modpost warning: WARNING: modpost: vmlinux.o(___ksymtab+seg6_hmac_net_init+0x0): Section mismatch in reference from the variable __ksymtab_seg6_hmac_net_init to the function .init.text:seg6_hmac_net_init() The symbol seg6_hmac_net_init is exported and annotated __init Fix this by removing the __init annotation of seg6_hmac_net_init or drop the export. Fixes: bf355b8d2c30 ("ipv6: sr: add core files for SR HMAC support") Reported-by: Hulk Robot Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20220628033134.21088-1-yuehaibing@huawei.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- net/ipv6/seg6_hmac.c | 1 - 1 file changed, 1 deletion(-) --- a/net/ipv6/seg6_hmac.c +++ b/net/ipv6/seg6_hmac.c @@ -414,7 +414,6 @@ int __net_init seg6_hmac_net_init(struct return 0; } -EXPORT_SYMBOL(seg6_hmac_net_init); void seg6_hmac_exit(void) {