Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp5816010pxb; Mon, 28 Mar 2022 18:15:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTvf6RCS1gpvzJRBaxdW0H56KK1yaCi5W4VYoAlBAgGOT0vWg/Oph6YmUHh0ErO4Fl4SLy X-Received: by 2002:a17:90b:1c07:b0:1c8:da30:5f18 with SMTP id oc7-20020a17090b1c0700b001c8da305f18mr1883073pjb.71.1648516526554; Mon, 28 Mar 2022 18:15:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648516526; cv=none; d=google.com; s=arc-20160816; b=Qu7cRM23cqsWggzFzg5cAwyVXLcibluTM8izQMJq1J6jzUtcUIsfr932kfsMTtZu0V 7KpZEPrnfujHyru9USeC17kq/8SHV7ro2D/HOIY9tps6E/h5C/g2WpCZwiYPp2vMxdaF f01QDdBwuepM2ihx28zX9QIEW5UGcdudQ7DfizSZ97s58nmJGCyeTBeD/C5M9fxZlDor Smyxsiz1RJ1KKZSE9/ENGGnP0cg3cv/9xwsn+9uuGiJAbdV2szoTy7JsPTUeOejFFPpl y2SjufT63doMeRtodm8nvgTtaQa+BdWgxfxIG947a4mxfUYEamfQrNnwfiGlSVC87GtP sJGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=37hzCSIvKGbXFplPDb1/ys0jyRxiUWlgsZrjWpWDyNI=; b=CThCBatTiobzR8oFTlJZedmpfeyrUnb6f5qw+d0+ngDBFqcwvGBSThDTBxW40Jprkh FVNWZkfVX2sZr6fKRH2nVF/V4uxsPjYDNsOb71VlIosAI+ts9M/d28Olrf7TBFhOx4Jr e9RZl6Ox1HuqrDiwXfF2EpFfJK1feettFREEqiw9NMa/Zscn69BRKJEY1TEkSDeqAOl8 vmN3x5f01BiRHO0Y+BAJ/eEYIO9CjpezJc4uCATCOuzyvVonFhev+OOeXdQe3Y8Bvrgn 3cvnBDKJOErdzNO+f4tNSInU//WyeURieYpg4G25g4rsold8SkpIPYsvEZrCs0+aIiwl pbNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=MZnRhKz4; 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 Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id y5-20020a17090a1f4500b001beec00d3ebsi1235703pjy.125.2022.03.28.18.15.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Mar 2022 18:15:26 -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=pass header.i=@lunn.ch header.s=20171124 header.b=MZnRhKz4; 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8FABCDEA; Mon, 28 Mar 2022 18:03:34 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229538AbiC2BEu (ORCPT + 99 others); Mon, 28 Mar 2022 21:04:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229468AbiC2BEt (ORCPT ); Mon, 28 Mar 2022 21:04:49 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10A7423FF3E; Mon, 28 Mar 2022 18:03:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=37hzCSIvKGbXFplPDb1/ys0jyRxiUWlgsZrjWpWDyNI=; b=MZnRhKz4gyBTAHWjjd7Fi5ILTN rPFOKDE8YKQ8WYHuDrfWcs2Km2QrOXh4Mte2QMlyH3Slx9U3jyF7vxSj7p84j/2N19BUlWJky/6gC rhpgClEWn5PIpHjYKWQHzYCxEHJ9cE6R/ZxTvclTHGiHEvCcwWanxkSqOuUk1yGBXR2k=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1nZ0G4-00D5dA-6I; Tue, 29 Mar 2022 03:02:52 +0200 Date: Tue, 29 Mar 2022 03:02:52 +0200 From: Andrew Lunn To: Michael Walle Cc: Horatiu Vultur , "David S . Miller" , Jakub Kicinski , Paolo Abeni , UNGLinuxDriver@microchip.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 net] net: lan966x: fix kernel oops on ioctl when I/F is down Message-ID: References: <20220328220350.3118969-1-michael@walle.cc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220328220350.3118969-1-michael@walle.cc> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 Tue, Mar 29, 2022 at 12:03:50AM +0200, Michael Walle wrote: > ioctls handled by phy_mii_ioctl() will cause a kernel oops when the > interface is down. Fix it by making sure there is a PHY attached. > > Fixes: 735fec995b21 ("net: lan966x: Implement SIOCSHWTSTAMP and SIOCGHWTSTAMP") > Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn Andrew