Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1255894imw; Tue, 5 Jul 2022 06:31:23 -0700 (PDT) X-Google-Smtp-Source: AGRyM1td0ZCdT409Uy755PXjT7r8k2d3OofODIhkCqqaZ37NW424UDNwGRP57uuLtrHCoFfAd1o9 X-Received: by 2002:a17:90b:4a8a:b0:1ed:4a56:d7e7 with SMTP id lp10-20020a17090b4a8a00b001ed4a56d7e7mr42662012pjb.1.1657027883555; Tue, 05 Jul 2022 06:31:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657027883; cv=none; d=google.com; s=arc-20160816; b=ZpuI5aVnZBK2qEcFjs+sLCHh7klbQWxXBt/NboyqVhTUwARxdYwTIaAjyaRNQDk36m Projl2EwFYso1xPCM5fpJPIEa2EUZ8QCwhx/KNQG2nA4/+BfPr79brUixgKfujgsCrV3 9y/pk56Ur0E3EvKtDsmwToJuaC+8URxAsFOb99DpSYbXLZsJkwKoiqSRvn6msmo5SD8i 2kTH5w6hnWACMhLIuwWZWQ830Bq4y2SL4g+K/IT67F9ZPjX5sLANNwoudFT/pEyYmwWL koxatwZTioWG3hIhS0pwvtqnTXBs1RdCoSY6pGDQqnQmOTHlSaUZeokHcp16LaSZODJB 9/0w== 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=9YmU7DHQqRbKU/mNYZB7rlNyNxiSPwmEN5zsHWumu24=; b=S9P3gIu49lAFNdBltaywDtnvJI95llsTsx3qoBrSYf72p32T1FGg6ElcLMJ/z57CFs nZU+Wl6z7/vgoO3k+ZU2KcgkUIY0qpJ5d+eCRFlSw9QQ3slPIA8OhDLgcTW5xvhynGgv +Rwi+9VIj994HTneK97u2xlJ8Y0q0vc6NZJZVArjP5x94i4r/AHMgKzhL0RMo4HnoxmL muD36BKchoKCB4ylmhKGwnWIjke+CtsBZa/9gpbvtiwJHT5LvEhudKePuUs8Jb4nugqT CuZo5cSnGUeT81kXHjA+gjqg9EbZtccgK6HvSQHLBaYr0IHrrTXQa0csKPArA3oOe8fJ dw/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FTv0VLnj; 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 pi3-20020a17090b1e4300b001ef7e191d66si12479249pjb.11.2022.07.05.06.31.11; Tue, 05 Jul 2022 06:31:23 -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=FTv0VLnj; 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 S238043AbiGEM1M (ORCPT + 99 others); Tue, 5 Jul 2022 08:27:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237028AbiGEMSh (ORCPT ); Tue, 5 Jul 2022 08:18:37 -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 703EC1A3B3; Tue, 5 Jul 2022 05:13:52 -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 DD208619B9; Tue, 5 Jul 2022 12:13:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E956DC341C7; Tue, 5 Jul 2022 12:13:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1657023231; bh=mWzakzAFCV63PIMMYja2uPuyb3HlopSPTzWsMv9g3WU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FTv0VLnjnZjrh62A//QOHoP/cs40qi+V9UinW7h+Uw4oyKl2gszBjK01Db2YS/Yio r9ONoxn96SGX6YE3gGKOObzuK0vcSWF1qPKH/yLoDyt/8pjr0onGSe0RRbLLPQVccL RuObyIYkz34BAyZQtsQSEJQUJ2eDW9iuHLkCO+Ts= 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 5.15 33/98] net: ipv6: unexport __init-annotated seg6_hmac_net_init() Date: Tue, 5 Jul 2022 13:57:51 +0200 Message-Id: <20220705115618.532198514@linuxfoundation.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220705115617.568350164@linuxfoundation.org> References: <20220705115617.568350164@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 @@ -408,7 +408,6 @@ int __net_init seg6_hmac_net_init(struct return 0; } -EXPORT_SYMBOL(seg6_hmac_net_init); void seg6_hmac_exit(void) {