| To: | Andrew Morton <andrewm@xxxxxxxxxx> |
|---|---|
| Subject: | Re: PATCH 2.4.0.9.2: export ethtool interface |
| From: | Andi Kleen <ak@xxxxxx> |
| Date: | Thu, 21 Sep 2000 13:33:02 +0200 |
| Cc: | Donald Becker <becker@xxxxxxxxx>, "howling@xxxxxxxx" <havanna_moon@xxxxxxx>, netdev@xxxxxxxxxxx |
| In-reply-to: | <39C9F123.D8FA4F68@uow.edu.au>; from Andrew Morton on Thu, Sep 21, 2000 at 01:30:42PM +0200 |
| References: | <39C883CF.9FB262FC@uow.edu.au> <Pine.LNX.4.10.10009201152510.1031-100000@vaio.greennet> <39C9F123.D8FA4F68@uow.edu.au> |
| Sender: | owner-netdev@xxxxxxxxxxx |
On Thu, Sep 21, 2000 at 01:30:42PM +0200, Andrew Morton wrote:
> 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.
There is (2.4.0test9pre2):
asmlinkage long sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
{
struct file * filp;
unsigned int flag;
int on, error = -EBADF;
filp = fget(fd);
if (!filp)
goto out;
error = 0;
lock_kernel(); <--------------
switch (cmd) {
-Andi
|
| Previous by Date: | Re: PATCH 2.4.0.9.2: export ethtool interface, Andrew Morton |
|---|---|
| Next by Date: | Re: PATCH 2.4.0.9.2: export ethtool interface, Andrew Morton |
| Previous by Thread: | Re: PATCH 2.4.0.9.2: export ethtool interface, Andrew Morton |
| Next by Thread: | Re: PATCH 2.4.0.9.2: export ethtool interface, Andrew Morton |
| Indexes: | [Date] [Thread] [Top] [All Lists] |