linux/net/core
Pavel Emelyanov fa86d322d8 [NEIGH]: Fix race between pneigh deletion and ipv6's ndisc_recv_ns (v3).
Proxy neighbors do not have any reference counting, so any caller
of pneigh_lookup (unless it's a netlink triggered add/del routine)
should _not_ perform any actions on the found proxy entry. 

There's one exception from this rule - the ipv6's ndisc_recv_ns() 
uses found entry to check the flags for NTF_ROUTER.

This creates a race between the ndisc and pneigh_delete - after 
the pneigh is returned to the caller, the nd_tbl.lock is dropped 
and the deleting procedure may proceed.

One of the fixes would be to add a reference counting, but this
problem exists for ndisc only. Besides such a patch would be too 
big for -rc4.

So I propose to introduce a __pneigh_lookup() which is supposed
to be called with the lock held and use it in ndisc code to check
the flags on alive pneigh entry.


Changes from v2:
As David noticed, Exported the __pneigh_lookup() to ipv6 module. 
The checkpatch generates a warning on it, since the EXPORT_SYMBOL 
does not follow the symbol itself, but in this file all the 
exports come at the end, so I decided no to break this harmony.

Changes from v1:
Fixed comments from YOSHIFUJI - indentation of prototype in header
and the pndisc_check_router() name - and a compilation fix, pointed
by Daniel - the is_routed was (falsely) considered as uninitialized
by gcc.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-03-24 14:48:59 -07:00
..
datagram.c
dev_mcast.c
dev.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-02-23 21:07:10 -08:00
dst.c
ethtool.c
fib_rules.c
filter.c
flow.c
gen_estimator.c
gen_stats.c
iovec.c
kmap_skb.h
link_watch.c
Makefile
neighbour.c [NEIGH]: Fix race between pneigh deletion and ipv6's ndisc_recv_ns (v3). 2008-03-24 14:48:59 -07:00
net_namespace.c
net-sysfs.c
net-sysfs.h
netevent.c [NET]: net/core/netevent.c should #include <net/netevent.h> 2007-07-05 17:40:27 -07:00
netpoll.c netpoll: zap_completion_queue: adjust skb->users counter 2008-03-20 16:07:27 -07:00
pktgen.c [PKTGEN]: Use proc_create() to setup ->proc_fops first 2008-02-28 14:11:49 -08:00
request_sock.c
rtnetlink.c [RTNL]: Validate hardware and broadcast address attribute for RTM_NEWLINK 2008-02-23 19:54:36 -08:00
scm.c
skbuff.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-02-15 07:33:07 -08:00
sock.c remove final fastcall users 2008-02-13 16:21:18 -08:00
stream.c [NET] CORE: Introducing new memory accounting interface. 2008-01-28 15:00:18 -08:00
sysctl_net_core.c
user_dma.c
utils.c