Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp211818iof; Mon, 6 Jun 2022 01:42:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzBH8fM81+RnapsfzVKxzYJPgjn8zvZUXqCX1NHRAoy5pzujlj49ygzlEWXIDXt7P9NIKT X-Received: by 2002:a63:f95c:0:b0:3fd:7e21:749e with SMTP id q28-20020a63f95c000000b003fd7e21749emr8036991pgk.49.1654504971739; Mon, 06 Jun 2022 01:42:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654504971; cv=none; d=google.com; s=arc-20160816; b=xx4I9kO4qTsH/xtnRvTYRxf63LqalJWnXIy24XdFiKAw3oPQlrONOpHDav5D06vkGG ldarnEXSX34SnCepll8j46AnyqvigX7kmA241FZ/mLmW8rKm5Sa9ivO4Z5PLmqjcUu1O FuAcMVcrSj9E/8ozI5SVxpDFjLYm4zrl/BU+wnqlD7tscRIsNyiCXnI8XWqN5d2NuxMY RnRjTnGrZHdFY/EVRYRUoKd/jBn4SKWJN3jbUQxzZSqL+rLGZKh+PX22/U3DPXsLJEsg 4cn6QOmIFfZJ1ATSSVM16hNfPayU2bMbfblkIMYpFJU0GSNv79CafAj98NdzL655SxgU 0MAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=qf/LAFvNlOZVyndVIbBrukqYfRWVajDnK78SGRSwEJo=; b=KF0TVQI0otHd4dVHT718wTa17ETMohLYmSIqP8WmODxgoeMdkdYVFRTSK+IAncsr+b mhzNd6Himgt54iy3+UOqPYFHbkVqDe8sYmaLIrg+tGxhHrfiECZpXBke0uJQI+JDDdox nmNELhK5c/uFh5JgijQjdnE9e7Bs+iUIeOvoR7HczGae/OkXTUVL48aWwfPm+PsiC1Le ATO9hO9W9glY9tzfPJSDwqGAeCGiFN7ec+WfJ5s8H+4UfXH+Grba91d60B5G9QjnFvNO iJGlGpxGxVhO8jUwcuRTqN5V9yPGHD0yVCs8K7msnLCrLADRfhz+xt397hiKz/ZLlLMj bwrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=H2FERXgp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id t6-20020a170902bc4600b0016366bfb1c2si19603896plz.424.2022.06.06.01.42.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 01:42:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=H2FERXgp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 76E4168333; Mon, 6 Jun 2022 01:26:32 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231814AbiFFI0J (ORCPT + 99 others); Mon, 6 Jun 2022 04:26:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231664AbiFFI0G (ORCPT ); Mon, 6 Jun 2022 04:26:06 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7000D522C5; Mon, 6 Jun 2022 01:26:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=qf/LAFvNlOZVyndVIbBrukqYfRWVajDnK78SGRSwEJo=; b=H2FERXgpXpa7C+nugyVBaR1JiZ o3ovvx4Akac7TCMAgXrgBFFZD5S/+hPpIasexaVYhrp2D78wpUErfayQ3h58BjJ/gFvIgKwhM86z6 RqIj7YcqZ9uu+urk+ekmeRFuj1XnYPWzH0xIhTyF8pcReJmS++zL8HRkf6O5Y6Z527EbbyB+GTYL+ s2X6HtLpWIF47v0Xcs6HhmvZSFtNMzKV5haLHKFwRGcS6j46TQeoCbtwnK97OFOeE9ikSQ51JsX0H 7HyUxfBKjlBE9i6g08lXt67GpeOYxI+8SIO/RhlhT0Z2bI2PX5reUJAICmNCSKBRERr7gzWlwqvkK tR4NiSPw==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:60962) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ny83e-0001c2-HH; Mon, 06 Jun 2022 09:25:54 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1ny83b-00084b-DH; Mon, 06 Jun 2022 09:25:51 +0100 Date: Mon, 6 Jun 2022 09:25:51 +0100 From: "Russell King (Oracle)" To: Masahiro Yamada Cc: "David S . Miller" , Jakub Kicinski , netdev@vger.kernel.org, Eric Dumazet , Paolo Abeni , Stephen Rothwell , Andrew Lunn , Florian Fainelli , Heiner Kallweit , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] net: mdio: unexport __init-annotated mdio_bus_init() Message-ID: References: <20220606045355.4160711-1-masahiroy@kernel.org> <20220606045355.4160711-2-masahiroy@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220606045355.4160711-2-masahiroy@kernel.org> Sender: Russell King (Oracle) X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 On Mon, Jun 06, 2022 at 01:53:53PM +0900, Masahiro Yamada wrote: > 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. > > modpost used to detect it, but it has been broken for a decade. > > Recently, I fixed modpost so it started to warn it again, then this > showed up in linux-next builds. > > There are two ways to fix it: > > - Remove __init > - Remove EXPORT_SYMBOL > > I chose the latter for this case because the only in-tree call-site, > drivers/net/phy/phy_device.c is never compiled as modular. > (CONFIG_PHYLIB is boolean) > > Fixes: 90eff9096c01 ("net: phy: Allow splitting MDIO bus/device support from PHYs") > Reported-by: Stephen Rothwell > Signed-off-by: Masahiro Yamada Reviewed-by: Russell King (Oracle) Thanks! -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!