[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <568EC18C.9050301@gmail.com>
Date: Thu, 07 Jan 2016 11:50:36 -0800
From: Florian Fainelli <f.fainelli@...il.com>
To: Russell King <rmk+kernel@....linux.org.uk>,
Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>
CC: netdev@...r.kernel.org
Subject: Re: [PATCH RFC 05/26] phy: improve safety of fixed-phy MII register
reading
On 07/12/15 09:37, Russell King wrote:
> There is no prevention of a concurrent call to both fixed_mdio_read()
> and fixed_phy_update_state(), which can result in the state being
> modified while it's being inspected. Fix this by using a seqcount
> to detect modifications, and memcpy()ing the state.
>
> We remain slightly naughty here, calling link_update() and updating
> the link status within the read-side loop - which would need rework
> of the design to change.
>
> Signed-off-by: Russell King <rmk+kernel@....linux.org.uk>
Reviewed-by: Florian Fainelli <f.fainelli@...il.com>
--
Florian
Powered by blists - more mailing lists