dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/net/core
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
..
Makefile [WEXT]: Move to net/wireless 2007-04-26 20:42:51 -07:00
datagram.c [NET]: Revert sk_buff walker cleanups. 2007-04-27 15:21:23 -07:00
dev.c [NET]: Add net_device change_rx_mode callback 2007-07-14 18:51:31 -07:00
dev_mcast.c [NET]: Fix secondary unicast/multicast address count maintenance 2007-07-10 22:16:23 -07:00
dst.c [NET]: Merge dst_discard_in and dst_discard_out. 2007-06-07 13:39:46 -07:00
ethtool.c [NET] core: whitespace cleanup 2007-04-25 22:24:09 -07:00
fib_rules.c [RTNETLINK]: Remove unnecessary locking in dump callbacks 2007-04-25 22:29:05 -07:00
filter.c [SK_BUFF]: Convert skb->tail to sk_buff_data_t 2007-04-25 22:26:28 -07:00
flow.c Add suspend-related notifications for CPU hotplug 2007-05-09 12:30:56 -07:00
gen_estimator.c [NET]: Fix gen_estimator timer removal race 2007-07-10 22:19:03 -07:00
gen_stats.c [SK_BUFF]: Convert skb->tail to sk_buff_data_t 2007-04-25 22:26:28 -07:00
iovec.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
kmap_skb.h [PATCH] severing skbuff.h -> highmem.h 2006-12-04 02:00:29 -05:00
link_watch.c [NET] link_watch: Always schedule urgent events 2007-05-10 23:45:28 -07:00
neighbour.c [NETLINK]: Mark netlink policies const 2007-06-07 13:40:10 -07:00
net-sysfs.c [NET]: Fix race condition about network device name allocation. 2007-05-19 15:39:25 -07:00
netevent.c [NET]: net/core/netevent.c should #include <net/netevent.h> 2007-07-05 17:40:27 -07:00
netpoll.c [NET]: Fix races in net_rx_action vs netpoll. 2007-07-11 19:32:02 -07:00
pktgen.c [PKTGEN]: IPSEC support 2007-07-10 22:16:36 -07:00
request_sock.c [NET]: Size listen hash tables using backlog hint 2006-12-02 21:21:44 -08:00
rtnetlink.c [RTNETLINK]: rtnl_link: allow specifying initial device address 2007-07-11 19:45:36 -07:00
scm.c [NET] CORE: Fix whitespace errors. 2007-02-10 23:19:25 -08:00
skbuff.c [NETFILTER]: x_tables: add TRACE target 2007-07-10 22:17:14 -07:00
sock.c [NET]: "wrong timeout value in sk_wait_data()": cleanups 2007-07-10 22:18:50 -07:00
stream.c [NET] CORE: Fix whitespace errors. 2007-02-10 23:19:25 -08:00
sysctl_net_core.c [XFRM]: Allow XFRM_ACQ_EXPIRES to be tunable via sysctl. 2007-05-31 01:23:23 -07:00
user_dma.c [NET]: Revert sk_buff walker cleanups. 2007-04-27 15:21:23 -07:00
utils.c [NET]: parse ip:port strings correctly in in4_pton 2007-05-31 01:23:27 -07:00