dev_base_lock and ->get_stats()?

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

 



Looking at 2.4.3-ac9 and working on a network driver problem, I've run
into a mismatch between docs and code --
Documentation/networking/netdevices.txt says that netdev->get_stats() is
protected by the dev_base_lock spinlock, but I've found numerous cases
in the code that suggest that isn't so (and I have emperical evidence
that get_stats() can and will be reentered.)

F.e. anything that calls rtmsg_ifinfo() almost always calls it without
the dev_base_lock held. This includes the dev_ioctl(), dev_ifsioc(),
dev_change_flags(), dev_open() call chain, among others. And anything
that notfies using the netdev_chain notifier list.

So, is it time for the docs to change, or is this a real problem? It'll
be simple enough to make my driver spin on its own lock.

Just FYI,
Dave Dillow
dillowd@y12.doe.gov
-
: 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