netdev
[Top] [All Lists]

Re: PATCH 2.4.0.9.2: export ethtool interface

To: Donald Becker <becker@xxxxxxxxx>
Subject: Re: PATCH 2.4.0.9.2: export ethtool interface
From: Andrew Morton <andrewm@xxxxxxxxxx>
Date: Thu, 21 Sep 2000 22:29:39 +1100
Cc: "howling@xxxxxxxx" <havanna_moon@xxxxxxx>, netdev@xxxxxxxxxxx
References: <39C883CF.9FB262FC@xxxxxxxxxx> <Pine.LNX.4.10.10009201152510.1031-100000@xxxxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
Donald Becker wrote:
> 
> ...
> >   Not a thing you'd want
> > to poll very frequently, particularly as some drivers are racy in this
> > area, and the consequences of hitting the race could be quite bad.
> > spin_lock_bh() is the correct solution for mdio protection, BTW.
> 
> Or having the timer based media monitor just skip the check until the next
> tick if the lock is set.  Imagine taking timer interrupt during the
> user-level ioctl()...  (There are a few other dangerous cases to consider as
> well.)

Yes.  On 2.4 (at least) there is nothing to prevent the driver's ioctl()
function from running on two or more CPUs simultaneously.

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