kernel-fxtec-pro1x/net/core
Patrick McHardy 85670cc1fa [NET_SCHED]: Fix fallout from dev->qdisc RCU change
The move of qdisc destruction to a rcu callback broke locking in the
entire qdisc layer by invalidating previously valid assumptions about
the context in which changes to the qdisc tree occur.

The two assumptions were:

- since changes only happen in process context, read_lock doesn't need
  bottem half protection. Now invalid since destruction of inner qdiscs,
  classifiers, actions and estimators happens in the RCU callback unless
  they're manually deleted, resulting in dead-locks when read_lock in
  process context is interrupted by write_lock_bh in bottem half context.

- since changes only happen under the RTNL, no additional locking is
  necessary for data not used during packet processing (f.e. u32_list).
  Again, since destruction now happens in the RCU callback, this assumption
  is not valid anymore, causing races while using this data, which can
  result in corruption or use-after-free.

Instead of "fixing" this by disabling bottem halfs everywhere and adding
new locks/refcounting, this patch makes these assumptions valid again by
moving destruction back to process context. Since only the dev->qdisc
pointer is protected by RCU, but ->enqueue and the qdisc tree are still
protected by dev->qdisc_lock, destruction of the tree can be performed
immediately and only the final free needs to happen in the rcu callback
to make sure dev_queue_xmit doesn't access already freed memory.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-09-28 18:01:50 -07:00
..
datagram.c [NET]: Replace CHECKSUM_HW by CHECKSUM_PARTIAL/CHECKSUM_COMPLETE 2006-09-22 14:53:53 -07:00
dev.c [NET_SCHED]: Fix fallout from dev->qdisc RCU change 2006-09-28 18:01:50 -07:00
dev_mcast.c [NET]: Remove unnecessary config.h includes from net/ 2006-09-22 14:54:21 -07:00
dst.c [NET]: add_timer -> mod_timer() in dst_run_gc() 2006-08-09 02:25:54 -07:00
dv.c [NET]: More kzalloc conversions. 2006-04-09 22:25:48 -07:00
ethtool.c [PATCH] ethtool: allow const ethtool_ops 2006-09-13 13:30:47 -04:00
fib_rules.c [NETLINK]: Make use of NLA_STRING/NLA_NUL_STRING attribute validation 2006-09-22 15:18:25 -07:00
filter.c [NET]: Fix sk->sk_filter field access 2006-09-22 15:18:47 -07:00
flow.c [NET]: Use SLAB_PANIC 2006-09-22 15:18:19 -07:00
gen_estimator.c [NET]: More kzalloc conversions. 2006-04-09 22:25:48 -07:00
gen_stats.c
iovec.c
link_watch.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
Makefile [NET]: Protocol Independant Policy Routing Rules Framework 2006-09-22 14:53:40 -07:00
neighbour.c [IPV6] NDISC: Set per-entry is_router flag in Proxy NA. 2006-09-22 15:20:24 -07:00
net-sysfs.c [PATCH] WE-21 support (core API) 2006-09-25 16:52:14 -04:00
netevent.c [NET]: Network Event Notifier Mechanism. 2006-08-02 13:38:20 -07:00
netpoll.c [NET]: Replace CHECKSUM_HW by CHECKSUM_PARTIAL/CHECKSUM_COMPLETE 2006-09-22 14:53:53 -07:00
pktgen.c [PKTGEN]: DSCP support 2006-09-28 18:01:47 -07:00
request_sock.c [NET]: More kzalloc conversions. 2006-04-09 22:25:48 -07:00
rtnetlink.c [RTNETLINK]: Possible dereference in net/core/rtnetlink.c 2006-09-28 18:01:23 -07:00
scm.c [PATCH] capable/capability.h (net/) 2006-01-11 18:42:14 -08:00
skbuff.c [NET]: Use SLAB_PANIC 2006-09-22 15:18:19 -07:00
sock.c [NET]: Fix sk->sk_filter field access 2006-09-22 15:18:47 -07:00
stream.c [NET]: fix __sk_stream_mem_reclaim 2006-07-12 17:58:53 -07:00
sysctl_net_core.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
user_dma.c [I/OAT]: net/core/user_dma.c should #include <net/netdma.h> 2006-07-21 14:49:49 -07:00
utils.c [NET] in6_pton: Kill errant printf statement. 2006-09-22 15:18:02 -07:00
wireless.c [PATCH] WE-21 support (core API) 2006-09-25 16:52:14 -04:00