Re: Removing MOD_xxx_USE_COUNT from net drivers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Paul Gortmaker wrote:
> As an alternative to sprinkling MOD_DEC_USE_COUNT throughout the failure
> paths of each net driver init sequence, maybe we should get the module use
> counters out of the drivers entirely.  The driver source(s) look cleaner
> and the driver author(s) need not worry about the handling of the count.

At first glance this looks pretty darn good.  This also solves any
potential races now and in the future between dev->open() call and
MOD_INC_USE_COUNT.

One small nit:  This was done for chrdevs using 'owner' as the name for
the field which takes the value of THIS_MODULE.  Just to make things
uniform, use 'owner' here too...

(also, you probably should CC davem@redhat.com directly on all
net-related patches, since he maintains that subsystem..)

	Jeff




-- 
Jeff Garzik                    | The difference between laziness and
Building 1024                  | prioritization is the end result.
MandrakeSoft                   |
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux