linux/net
Eric Dumazet 96631ed16c udp: introduce sk_for_each_rcu_safenext()
Corey Minyard found a race added in commit 271b72c7fa
(udp: RCU handling for Unicast packets.)

 "If the socket is moved from one list to another list in-between the
 time the hash is calculated and the next field is accessed, and the
 socket has moved to the end of the new list, the traversal will not
 complete properly on the list it should have, since the socket will
 be on the end of the new list and there's not a way to tell it's on a
 new list and restart the list traversal.  I think that this can be
 solved by pre-fetching the "next" field (with proper barriers) before
 checking the hash."

This patch corrects this problem, introducing a new
sk_for_each_rcu_safenext() macro.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-29 11:19:58 -07:00
..
9p 9p: fix sparse warnings 2008-10-22 18:54:47 -05:00
802 net: convert print_mac to %pM 2008-10-27 17:06:18 -07:00
8021q vlan: propogate ethtool speed values 2008-10-28 23:02:34 -07:00
appletalk net: convert print_mac to %pM 2008-10-27 17:06:18 -07:00
atm net: convert print_mac to %pM 2008-10-27 17:06:18 -07:00
ax25 ax25: Quick fix for making sure unaccepted sockets get destroyed. 2008-10-06 12:53:50 -07:00
bluetooth Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-10-17 08:58:52 -07:00
bridge net: remove NIP6(), NIP6_FMT, NIP6_SEQFMT and final users 2008-10-28 23:02:38 -07:00
can net: Remove CONFIG_KMOD from net/ (towards removing CONFIG_KMOD entirely) 2008-10-16 15:24:51 -07:00
core udp: RCU handling for Unicast packets. 2008-10-29 02:11:14 -07:00
dccp dccp: Port redirection support for DCCP 2008-10-19 23:36:47 -07:00
decnet Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-10-17 08:58:52 -07:00
dsa dsa: fix compile bug on s390 2008-10-13 18:58:48 -07:00
econet netns: Use net_eq() to compare net-namespaces for optimization. 2008-07-19 22:34:43 -07:00
ethernet dsa: add support for Trailer tagging format 2008-10-08 17:24:16 -07:00
ieee80211 net: convert print_mac to %pM 2008-10-27 17:06:18 -07:00
ipv4 udp: introduce sk_for_each_rcu_safenext() 2008-10-29 11:19:58 -07:00
ipv6 udp: introduce sk_for_each_rcu_safenext() 2008-10-29 11:19:58 -07:00
ipx netns: Use net_eq() to compare net-namespaces for optimization. 2008-07-19 22:34:43 -07:00
irda net: convert print_mac to %pM 2008-10-27 17:06:18 -07:00
iucv iucv: Fix mismerge again. 2008-09-30 03:03:35 -07:00
key af_key: fix SADB_X_SPDDELETE response 2008-10-10 14:07:03 -07:00
lapb
llc net: convert print_mac to %pM 2008-10-27 17:06:18 -07:00
mac80211 mac80211: convert to %pM away from print_mac 2008-10-27 17:06:16 -07:00
netfilter netfilter: replace uses of NIP6_FMT with %p6 2008-10-28 16:08:13 -07:00
netlabel net, misc: replace uses of NIP6_FMT with %p6 2008-10-28 23:02:32 -07:00
netlink netlink: constify struct nlattr * arg to parsing functions 2008-10-28 11:59:11 -07:00
netrom netrom: Fix sock_orphan() use in nr_release 2008-10-06 12:54:57 -07:00
packet net: convert BUG_TRAP to generic WARN_ON 2008-07-25 21:43:18 -07:00
phonet Phonet: do not reply to indication reset packets 2008-10-26 23:07:25 -07:00
rfkill net/rfkill/rfkill-input.c needs <linux/sched.h> 2008-10-14 10:23:27 -07:00
rose netdev: Handle ->addr_list_lock just like ->_xmit_lock for lockdep. 2008-07-22 14:16:42 -07:00
rxrpc net/rxrpc: Use an IS_ERR test rather than a NULL test 2008-08-13 02:40:48 -07:00
sched Merge branch 'timers/range-hrtimers' into v28-range-hrtimers-for-linus-v2 2008-10-22 09:48:06 +02:00
sctp net, misc: replace uses of NIP6_FMT with %p6 2008-10-28 23:02:32 -07:00
sunrpc net: remove NIP6(), NIP6_FMT, NIP6_SEQFMT and final users 2008-10-28 23:02:38 -07:00
tipc net: convert print_mac to %pM 2008-10-27 17:06:18 -07:00
unix [PATCH] assorted path_lookup() -> kern_path() conversions 2008-10-23 05:12:52 -04:00
wanrouter wanmain.c doesn't need syncppp.h 2008-07-23 23:00:36 +02:00
wireless wireless: fix regression caused by regulatory config option 2008-10-26 10:38:52 -07:00
x25 netns: Use net_eq() to compare net-namespaces for optimization. 2008-07-19 22:34:43 -07:00
xfrm net, misc: replace uses of NIP6_FMT with %p6 2008-10-28 23:02:32 -07:00
compat.c flag parameters: paccept 2008-07-24 10:47:27 -07:00
Kconfig netns: Coexist with the sysfs limitations v2 2008-10-27 17:51:47 -07:00
Makefile net: Distributed Switch Architecture protocol support 2008-10-08 17:15:19 -07:00
nonet.c
socket.c net: Remove CONFIG_KMOD from net/ (towards removing CONFIG_KMOD entirely) 2008-10-16 15:24:51 -07:00
sysctl_net.c missing bits of net-namespace / sysctl 2008-07-27 09:45:34 -07:00
TUNABLE