Re: owner field in `struct fs'

From: Andrew Morton (andrewm@uow.edu.au)
Date: Sun Jun 25 2000 - 06:40:40 EST


Alexander Viro wrote:
>
> > ...
> What about placing try_inc_mod_count() in __get_dev_by_name()? (and
> compensating for that afterwards, indeed).

mm.. wrapping both dev_ifsioc() and dev_change_flags() with an inc/dec
may be a fix. That means all the places where the netdevice methods can
be called need to be eyeballed. I'll do that.

> I'm less than happy about ->do_ioctl(), though - are you sure that it can
> happen with refcount==0? AFAICS it does not touch the reference counter
> and it means that we need to be extra cautious inside...

Yes, these methods are called with refcount == 0. For example, the
'mii-diag' tool may be used to manipulate the device's MII when the
interface is downed (via netdevice.do_ioctl())

For example:

victoria:/home/morton# ifconfig eth0 down
victoria:/home/morton# lsmod
Module Size Used by
3c59x 18980 0 (autoclean)
victoria:/home/morton# ifconfig eth0 mtu 1000
victoria:/home/morton#

We called netdevice.change_mtu() with refcount == 0.

netdevice.open() is a misnomer. The device is always "open". It should
have been called 'start' or 'up'.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jun 26 2000 - 21:00:06 EST