Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1587027iog; Thu, 16 Jun 2022 09:18:29 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uZEMTv9SwjO/q2YA6x6LIN/1i+cag3t6+nywVpdmyjFUMxTRneVZZu1zEu3Ih+mcO5eNqK X-Received: by 2002:a17:906:74b:b0:710:e677:1383 with SMTP id z11-20020a170906074b00b00710e6771383mr5203395ejb.444.1655396309171; Thu, 16 Jun 2022 09:18:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655396309; cv=none; d=google.com; s=arc-20160816; b=RcshjokVgUirlijRmFpvHaJ9WcY+cPUvfeSo0mL1iA6nzC7BtZntFIJKrqfVxbEXgq 4D01OH6bNW47Eojpi9UTRcDHhmfyaEW8TYlk6SbhVqpCNPlvJklfYN7aeWLxHCXnHisA Fz6hdwPAtmp8egSWmnvQvA8sIcCpRkqr8Z0OdJpCyvkhcXMN/1rMIMidgCzNeS5Jm4AY pwqcsmp34iDIHf1zeJ6EXnvTKkW2eSuCAfBreKK+S/6wldQTyxJro8lMFm9x5SD44HQ4 sC5+7UeRnKu3aco2aXzZuOPEZ6feQenvYFal61pqBxasXCOydVTY9XgCrcj7/JwmV3yO 5AKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=U20S89Yfb4QLkMs9/g8dKtwF8iYhPbmpmvVZG6GuWfw=; b=X9CLiR+EMEDgVzQHLF8PZh2h1YIskxPKGqz5Kh/1PvSrbyilP3fjtNBrckCFFWYI0b T6PVE1lkvxQ7uMsLm1DDHHKsJucWdpN7BtKEP1/Inl5y4TGS1dr7ID74HBo/U6z0Nb04 d/SPB8renyZQXDczSiCF5vHL503YsKeA9vFadXgmSsQMLd4rwJ4TpjFWhzDDVPUuyF2y vI9/E6SWUVg5Ge1kUqxF7cSUsqY6F9dBuz+J1CZqqr1VbqDtgSsc6xjqrw8VDkBzlAc/ fxA6G8ttddYLDDAJPODWi3PkfaW9xH6N216h/z/TrCluQOYHYvlo9IjE59D206YSDpxU FgcQ== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d17-20020a17090648d100b00715777cb7cesi2033891ejt.417.2022.06.16.09.18.03; Thu, 16 Jun 2022 09:18:29 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377930AbiFPPeF (ORCPT + 99 others); Thu, 16 Jun 2022 11:34:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236304AbiFPPeE (ORCPT ); Thu, 16 Jun 2022 11:34:04 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64F852DAA3 for ; Thu, 16 Jun 2022 08:34:03 -0700 (PDT) Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o1rVN-0003f5-5R; Thu, 16 Jun 2022 17:33:57 +0200 Received: from ore by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1o1rVM-0006BN-HX; Thu, 16 Jun 2022 17:33:56 +0200 Date: Thu, 16 Jun 2022 17:33:56 +0200 From: Oleksij Rempel To: Andrew Lunn Cc: Heiner Kallweit , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH net-next v1 1/1] net: phy: at803x: fix NULL pointer dereference on AR9331 PHY Message-ID: <20220616153356.GC28995@pengutronix.de> References: <20220616113105.890373-1-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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 On Thu, Jun 16, 2022 at 03:38:15PM +0200, Andrew Lunn wrote: > On Thu, Jun 16, 2022 at 01:31:05PM +0200, Oleksij Rempel wrote: > > Latest kernel will explode on the PHY interrupt config, since it depends > > now on allocated priv. So, run probe to allocate priv to fix it. > > > > Fixes: 3265f4218878 ("net: phy: at803x: add fiber support") > > Signed-off-by: Oleksij Rempel > > --- > > drivers/net/phy/at803x.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c > > index 6a467e7817a6..b72a807f2e03 100644 > > --- a/drivers/net/phy/at803x.c > > +++ b/drivers/net/phy/at803x.c > > @@ -2072,6 +2072,8 @@ static struct phy_driver at803x_driver[] = { > > /* ATHEROS AR9331 */ > > PHY_ID_MATCH_EXACT(ATH9331_PHY_ID), > > .name = "Qualcomm Atheros AR9331 built-in PHY", > > + .probe = at803x_probe, > > + .remove = at803x_remove, > > .suspend = at803x_suspend, > > .resume = at803x_resume, > > .flags = PHY_POLL_CABLE_TEST, > > Is the same change needed for some of the other PHYs? QCA8081? > QCA9561? Yes, good point. Regards, Oleksij -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |