netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/1] drivers: net: cpsw: Fix NULL pointer dereference with two slave PHYs
@ 2016-04-19 13:56 Andrew Goodbody
  2016-04-19 13:56 ` [PATCH v2 1/1] drivers: net: cpsw: Prevent NUll pointer dereference with two PHYs Andrew Goodbody
  0 siblings, 1 reply; 13+ messages in thread
From: Andrew Goodbody @ 2016-04-19 13:56 UTC (permalink / raw)
  To: netdev
  Cc: linux-kernel, linux-omap, mugunthanvnm, grygorii.strashko, tony,
	Andrew Goodbody

Resend to add more people on Cc: as requested by Grygrii Strashko.

This is a fix for a NULL pointer dereference from cpsw which is triggered
by having two slave PHYs attached to a cpsw network device. The problem is
due to only maintaining a single reference to a PHY node in the prive data
which gets overwritten by the second PHY probe. So move the PHY node
reference to the individual slave data so that there is now one per slave.

v1 had a problem that data->slaves was used before it had been filled in

Andrew Goodbody (1):
  Prevent NUll pointer dereference with two PHYs on cpsw

 drivers/net/ethernet/ti/cpsw.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

-- 
2.5.0

^ permalink raw reply	[flat|nested] 13+ messages in thread
* [PATCH v2 0/1] drivers: net: cpsw: Fix NULL pointer dereference with two slave PHYs
@ 2016-04-18 13:53 Andrew Goodbody
  2016-04-18 13:53 ` [PATCH v2 1/1] drivers: net: cpsw: Prevent NUll pointer dereference with two PHYs Andrew Goodbody
  0 siblings, 1 reply; 13+ messages in thread
From: Andrew Goodbody @ 2016-04-18 13:53 UTC (permalink / raw)
  To: netdev; +Cc: linux-kernel, Andrew Goodbody

This is a fix for a NULL pointer dereference from cpsw which is triggered
by having two slave PHYs attached to a cpsw network device. The problem is
due to only maintaining a single reference to a PHY node in the prive data
which gets overwritten by the second PHY probe. So move the PHY node
reference to the individual slave data so that there is now one per slave.

v1 had a problem that data->slaves was used before it had been filled in

Andrew Goodbody (1):
  Prevent NUll pointer dereference with two PHYs on cpsw

 drivers/net/ethernet/ti/cpsw.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

-- 
2.5.0

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-04-20  9:37 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-19 13:56 [PATCH v2 0/1] drivers: net: cpsw: Fix NULL pointer dereference with two slave PHYs Andrew Goodbody
2016-04-19 13:56 ` [PATCH v2 1/1] drivers: net: cpsw: Prevent NUll pointer dereference with two PHYs Andrew Goodbody
2016-04-19 14:41   ` Grygorii Strashko
2016-04-19 15:01     ` David Rivshin (Allworx)
2016-04-19 15:44       ` Grygorii Strashko
2016-04-19 17:14         ` David Rivshin (Allworx)
2016-04-19 17:44           ` Florian Fainelli
2016-04-19 18:44           ` Grygorii Strashko
2016-04-19 22:43             ` David Miller
2016-04-19 23:38               ` David Rivshin (Allworx)
2016-04-20  9:37                 ` Grygorii Strashko
2016-04-19 16:05     ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2016-04-18 13:53 [PATCH v2 0/1] drivers: net: cpsw: Fix NULL pointer dereference with two slave PHYs Andrew Goodbody
2016-04-18 13:53 ` [PATCH v2 1/1] drivers: net: cpsw: Prevent NUll pointer dereference with two PHYs Andrew Goodbody

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).