linux/include
Patrick McHardy 24023451c8 [NET]: Add net_device change_rx_mode callback
Currently the set_multicast_list (and set_rx_mode) callbacks are
responsible for configuring the device according to the IFF_PROMISC,
IFF_MULTICAST and IFF_ALLMULTI flags and the mc_list (and uc_list in
case of set_rx_mode).

These callbacks can be invoked from BH context without the rtnl_mutex
by dev_mc_add/dev_mc_delete, which makes reading the device flags and
promiscous/allmulti count racy. For real hardware drivers that just
commit all changes to the hardware this is not a real problem since
the stack guarantees to call them for every change, so at least the
final call will not race and commit the correct configuration to the
hardware.

For software devices that want to synchronize promiscous and multicast
state to an underlying device however this can cause corruption of the
underlying device's flags or promisc/allmulti counts.

When the software device is concurrently put in promiscous or allmulti
mode while set_multicast_list is invoked from bottem half context, the
device might synchronize the change to the underlying device without
holding the rtnl_mutex, which races with concurrent changes to the
underlying device.

Add a dev->change_rx_flags hook that is invoked when any of the flags
that affect rx filtering change (under the rtnl_mutex), which allows
drivers to perform synchronization immediately and only synchronize
the address lists in set_multicast_list/set_rx_mode.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-07-14 18:51:31 -07:00
..
acpi Pull osi-now into release branch 2007-06-02 01:02:09 -04:00
asm-alpha PCI: remove pci_dac_dma_... APIs 2007-07-11 16:02:11 -07:00
asm-arm Merge branch 'ioat-md-accel-for-linus' of git://lost.foo-projects.org/~dwillia2/git/iop 2007-07-13 10:52:27 -07:00
asm-arm26 lots-of-architectures: enable arbitary speed tty support 2007-07-10 17:51:13 -07:00
asm-avr32 lots-of-architectures: enable arbitary speed tty support 2007-07-10 17:51:13 -07:00
asm-blackfin Blackfin arch: Add peripheral io API to gpio header file 2007-07-12 17:06:45 +08:00
asm-cris PCI: remove pci_dac_dma_... APIs 2007-07-11 16:02:11 -07:00
asm-frv PCI: remove pci_dac_dma_... APIs 2007-07-11 16:02:11 -07:00
asm-generic sched: simplify sched_find_first_bit() 2007-07-09 18:52:00 +02:00
asm-h8300 PCI: Use a weak symbol for the empty version of pcibios_add_platform_entries() 2007-07-11 16:02:07 -07:00
asm-i386 Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6 2007-07-12 13:40:57 -07:00
asm-ia64 [IA64] Un-break ia64 build 2007-07-12 16:04:39 -07:00
asm-m32r lots-of-architectures: enable arbitary speed tty support 2007-07-10 17:51:13 -07:00
asm-m68k PCI: Use a weak symbol for the empty version of pcibios_add_platform_entries() 2007-07-11 16:02:07 -07:00
asm-m68knommu PCI: remove pci_dac_dma_... APIs 2007-07-11 16:02:11 -07:00
asm-mips [MIPS] Workaround for a sparse warning in include/asm-mips/mach-tx4927/ioremap.h 2007-07-13 17:40:01 +01:00
asm-parisc PCI: remove pci_dac_dma_... APIs 2007-07-11 16:02:11 -07:00
asm-powerpc PCI: remove pci_dac_dma_... APIs 2007-07-11 16:02:11 -07:00
asm-ppc PCI: remove pci_dac_dma_... APIs 2007-07-11 16:02:11 -07:00
asm-s390 lots-of-architectures: enable arbitary speed tty support 2007-07-10 17:51:13 -07:00
asm-sh PCI: remove pci_dac_dma_... APIs 2007-07-11 16:02:11 -07:00
asm-sh64 PCI: remove pci_dac_dma_... APIs 2007-07-11 16:02:11 -07:00
asm-sparc PCI: remove pci_dac_dma_... APIs 2007-07-11 16:02:11 -07:00
asm-sparc64 PCI: remove pci_dac_dma_... APIs 2007-07-11 16:02:11 -07:00
asm-um uml: add asm/paravirt.h 2007-06-24 08:59:11 -07:00
asm-v850 PCI: remove pci_dac_dma_... APIs 2007-07-11 16:02:11 -07:00
asm-x86_64 Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6 2007-07-12 13:40:57 -07:00
asm-xtensa PCI: remove pci_dac_dma_... APIs 2007-07-11 16:02:11 -07:00
crypto [CRYPTO] cryptd: Add software async crypto daemon 2007-05-02 14:38:32 +10:00
keys [AF_RXRPC]: Provide secure RxRPC sockets for use by userspace and kernel both 2007-04-26 15:48:28 -07:00
linux [NET]: Add net_device change_rx_mode callback 2007-07-14 18:51:31 -07:00
math-emu Delete unused header file math-emu/extended.h 2007-05-08 11:15:05 -07:00
media V4L/DVB (5592): DMA: Correctly free resources on error, sync PCI streamed data 2007-05-09 10:12:42 -03:00
mtd UBI: Unsorted Block Images 2007-04-27 14:23:33 +03:00
net [NET_SCHED]: ematch: module autoloading 2007-07-11 19:46:26 -07:00
pcmcia PCMCIA-NETDEV : add new ID of lan&modem multifunction card 2007-07-08 22:16:39 -04:00
rdma IB/cm: Include HCA ACK delay in local ACK timeout 2007-07-10 21:50:05 -07:00
rxrpc [AF_RXRPC]: Delete the old RxRPC code. 2007-04-26 15:55:48 -07:00
scsi [SCSI] sas_scsi_host: Convert to use the kthread API 2007-05-06 09:33:17 -05:00
sound [ALSA] version 1.0.14 2007-05-31 11:03:27 +02:00
video atmel_lcdfb: AT91/AT32 LCD Controller framebuffer driver 2007-05-11 08:29:37 -07:00
Kbuild