linux-omap.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
  0 siblings, 0 replies; 3+ 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] 3+ messages in thread

* RE: [PATCH v2 0/1] drivers: net: cpsw: Fix NULL pointer dereference with two slave PHYs
       [not found] ` <20160419.201550.902520333910307559.davem@davemloft.net>
@ 2016-04-20  8:49   ` Andrew Goodbody
  2016-04-20 14:56     ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Goodbody @ 2016-04-20  8:49 UTC (permalink / raw)
  To: David Miller
  Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	David Rivshin (Allworx), grygorii.strashko@ti.com,
	mugunthanvnm@ti.com, linux-omap@vger.kernel.org, tony@atomide.com

> -----Original Message-----
> From: Andrew Goodbody <andrew.goodbody@cambrionix.com>
> Date: Mon, 18 Apr 2016 14:53:25 +0100
> 
> > 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
> 
> I already applied v1 the other day, so you need to send me a relative patch
> rather than a whole new one.
> 
> Thanks.

Sorry, I had no notification that this had happened. However I thought that the plan was to revert v1 and go with David Rivshin's patch instead. I'll see if I can create a revert in a little while.

Andrew

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

* Re: [PATCH v2 0/1] drivers: net: cpsw: Fix NULL pointer dereference with two slave PHYs
  2016-04-20  8:49   ` [PATCH v2 0/1] drivers: net: cpsw: Fix NULL pointer dereference with two slave PHYs Andrew Goodbody
@ 2016-04-20 14:56     ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2016-04-20 14:56 UTC (permalink / raw)
  To: andrew.goodbody
  Cc: netdev, linux-kernel, drivshin.allworx, grygorii.strashko,
	mugunthanvnm, linux-omap, tony

From: Andrew Goodbody <andrew.goodbody@cambrionix.com>
Date: Wed, 20 Apr 2016 08:49:34 +0000

> Sorry, I had no notification that this had happened. However I
> thought that the plan was to revert v1 and go with David Rivshin's
> patch instead. I'll see if I can create a revert in a little while.

Yes, that's  fine.

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

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

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1460987606-18125-1-git-send-email-andrew.goodbody@cambrionix.com>
     [not found] ` <20160419.201550.902520333910307559.davem@davemloft.net>
2016-04-20  8:49   ` [PATCH v2 0/1] drivers: net: cpsw: Fix NULL pointer dereference with two slave PHYs Andrew Goodbody
2016-04-20 14:56     ` David Miller
2016-04-19 13:56 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).