[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20191018.125825.843031213764652652.davem@davemloft.net>
Date: Fri, 18 Oct 2019 12:58:25 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: hkallweit1@...il.com
Cc: andrew@...n.ch, f.fainelli@...il.com, netdev@...r.kernel.org
Subject: Re: [PATCH net-next] net: phy: avoid NPE if read_page/write_page
callbacks are not available
From: Heiner Kallweit <hkallweit1@...il.com>
Date: Wed, 16 Oct 2019 21:53:31 +0200
> Currently there's a bug in the module subsystem [0] preventing load of
> the PHY driver module on certain systems (as one symptom).
> This results in a NPE on such systems for the following reason:
> Instead of the correct PHY driver the genphy driver is loaded that
> doesn't implement the read_page/write_page callbacks. Every call to
> phy_read_paged() et al will result in a NPE therefore.
>
> In parallel to fixing the root cause we should make sure that this one
> and maybe similar issues in other subsystems don't result in a NPE
> in phylib. So let's check for the callbacks before using them and warn
> once if they are not available.
>
> [0] https://marc.info/?t=157072642100001&r=1&w=2
>
> Signed-off-by: Heiner Kallweit <hkallweit1@...il.com>
I read the discussion over a few times and this looks good to me for now,
so applied.
Thanks.
Powered by blists - more mailing lists