Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938843AbcJGPlD (ORCPT ); Fri, 7 Oct 2016 11:41:03 -0400 Received: from mail-ua0-f172.google.com ([209.85.217.172]:34099 "EHLO mail-ua0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757108AbcJGPUx (ORCPT ); Fri, 7 Oct 2016 11:20:53 -0400 MIME-Version: 1.0 In-Reply-To: <1475853202-19903-1-git-send-email-xander.huff@ni.com> References: <1475853202-19903-1-git-send-email-xander.huff@ni.com> From: Moritz Fischer Date: Fri, 7 Oct 2016 08:20:51 -0700 Message-ID: Subject: Re: [PATCH] net: macb: NULL out phydev after removing mdio bus To: Xander Huff Cc: Nicolas Ferre , netdev@vger.kernel.org, Nathan Sullivan , Linux Kernel Mailing List , Brad Mouring Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 596 Lines: 12 On Fri, Oct 7, 2016 at 8:13 AM, Xander Huff wrote: > From: Nathan Sullivan > > To ensure the dev->phydev pointer is not used after becoming invalid in > mdiobus_unregister, set it to NULL. This happens when removing the macb > driver without first taking its interface down, since unregister_netdev > will end up calling macb_close. > > Signed-off-by: Xander Huff > Signed-off-by: Nathan Sullivan > Signed-off-by: Brad Mouring Reviewed-by: Moritz Fischer