Andi Kleen wrote:
> On Tue, Oct 31, 2000 at 08:55:13PM +0000, Alan Cox wrote:
> >       What about the fact anyone can crash a box using ioctls on net
> >       devices and waiting for an unload - was this fixed ?

> The ioctls of network devices are generally unsafe on SMP, because
> they run with kernel lock dropped now but are mostly not safe to do so.

Wrong.  The BLK is dropped in sock_ioctl, but struct netdevice::do_ioctl
is called with rtnl_lock held:

        net/core/dev.c:
                rtnl_lock();
                ret = dev_ifsioc(&ifr, cmd);
                rtnl_unlock();

Therefore for 2.4.x, our concern is whether a particular net driver
needs further SMP protection internally, or if rtnl_lock (a semaphore,
not a spinlock) is sufficient.

        Jeff


-- 
Jeff Garzik             | "Mind if I drive?"  -Sam
Building 1024           | "Not if you don't mind me clawing at the
MandrakeSoft            |  dash and shrieking like a cheerleader."
                        |                     -Max
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to