linux/net
Jon Paul Maloy b45db71b52 tipc: eliminate race during node creation
Instances of struct node are created in the function tipc_disc_rcv()
under the assumption that there is no race between received discovery
messages arriving from the same node. This assumption is wrong.
When we use more than one bearer, it is possible that discovery
messages from the same node arrive at the same moment, resulting in
creation of two instances of struct tipc_node. This may later cause
confusion during link establishment, and may result in one of the links
never becoming activated.

We fix this by making lookup and potential creation of nodes atomic.
Instead of first looking up the node, and in case of failure, create it,
we now start with looking up the node inside node_link_create(), and
return a reference to that one if found. Otherwise, we go ahead and
create the node as we did before.

Reviewed-by: Erik Hugne <erik.hugne@ericsson.com>
Reviewed-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-04 16:09:31 -08:00
..
6lowpan
9p
802
8021q
appletalk
atm
ax25
batman-adv
bluetooth Bluetooth: Fix potential NULL dereference 2015-02-03 09:02:12 +01:00
bridge bridge: Let bridge not age 'externally' learnt FDB entries, they are removed when 'external' entity notifies the aging 2015-02-04 13:51:10 -08:00
caif
can
ceph
core Last round of updates for net-next: 2015-02-04 14:57:45 -08:00
dcb
dccp
decnet
dns_resolver
dsa
ethernet
hsr
ieee802154
ipv4 net: add skb functions to process remote checksum offload 2015-02-04 13:54:07 -08:00
ipv6 ipv6: Allow for partial checksums on non-ufo packets 2015-02-02 19:28:05 -08:00
ipx
irda irda: use msecs_to_jiffies for conversions 2015-01-30 18:08:25 -08:00
iucv
key
l2tp
lapb
llc
mac80211 Last round of updates for net-next: 2015-02-04 14:57:45 -08:00
mac802154
mpls net: mark some potential candidates __read_mostly 2015-01-30 17:58:39 -08:00
netfilter
netlabel netlabel: Less function calls in netlbl_mgmt_add_common() after error detection 2015-02-03 16:22:13 -08:00
netlink net: remove sock_iocb 2015-01-28 23:15:07 -08:00
netrom
nfc
openvswitch openvswitch: Add support for checksums on UDP tunnels. 2015-01-28 23:04:15 -08:00
packet
phonet
rds
rfkill Last round of updates for net-next: 2015-02-04 14:57:45 -08:00
rose
rxrpc net-timestamp: no-payload option 2015-02-02 18:46:51 -08:00
sched pkt_sched: fq: remove useless TIME_WAIT check 2015-01-28 23:23:57 -08:00
sctp net: sctp: Deletion of an unnecessary check before the function call "kfree" 2015-02-02 19:29:43 -08:00
sunrpc
switchdev swdevice: add new apis to set and del bridge port attributes 2015-02-01 23:16:34 -08:00
tipc tipc: eliminate race during node creation 2015-02-04 16:09:31 -08:00
unix net: remove sock_iocb 2015-01-28 23:15:07 -08:00
vmw_vsock
wimax
wireless Last round of updates for net-next: 2015-02-04 14:57:45 -08:00
x25
xfrm
compat.c
Kconfig
Makefile
socket.c net: remove sock_iocb 2015-01-28 23:15:07 -08:00
sysctl_net.c