netdev
[Top] [All Lists]

Re: [PATCH] Prevent "eth0: driver changed get_stats after register" lyin

To: Russell King <rmk@xxxxxxxxxxxxxxxx>
Subject: Re: [PATCH] Prevent "eth0: driver changed get_stats after register" lying
From: "David S. Miller" <davem@xxxxxxxxxx>
Date: Sun, 19 Oct 2003 00:06:46 -0700
Cc: netdev@xxxxxxxxxxx
In-reply-to: <20031018214622.B25375@flint.arm.linux.org.uk>
References: <20031018214622.B25375@flint.arm.linux.org.uk>
Sender: netdev-bounce@xxxxxxxxxxx
On Sat, 18 Oct 2003 21:46:22 +0100
Russell King <rmk@xxxxxxxxxxxxxxxx> wrote:

> We set "dev->last_stats" after we have registered the class device.
> During class device registration, we trigger the hotplug scripts,
> which can in turn bring up the interface.  This in turn checks to
> see if "dev->last_stats == dev->get_stats", and, since we haven't
> set dev->last_stats yet, we complain.
> 
> Here is a patch against 2.6.0-test8 which moves the initialisation
> of last_stats such that we avoid the race.

Looks ok, thanks Russell.

<Prev in Thread] Current Thread [Next in Thread>