]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: eliminate race condition at multicast reception
authorJon Paul Maloy <jon.maloy@ericsson.com>
Thu, 5 Feb 2015 13:36:44 +0000 (08:36 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 6 Feb 2015 00:00:03 +0000 (16:00 -0800)
commit73ef40c41eea0f0bc3a921692c803846822b6604
tree1b1e50e705f4ddd3b36a43ac9067538db3e8233f
parent5363cee667ed96046ec95ad600de0084dd61b32b
tipc: eliminate race condition at multicast reception

In a previous commit in this series we resolved a race problem during
unicast message reception.

Here, we resolve the same problem at multicast reception. We apply the
same technique: an input queue serializing the delivery of arriving
buffers. The main difference is that here we do it in two steps.
First, the broadcast link feeds arriving buffers into the tail of an
arrival queue, which head is consumed at the socket level, and where
destination lookup is performed. Second, if the lookup is successful,
the resulting buffer clones are fed into a second queue, the input
queue. This queue is consumed at reception in the socket just like
in the unicast case. Both queues are protected by the same lock, -the
one of the input queue.

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>
net/tipc/bcast.c
net/tipc/bcast.h
net/tipc/msg.h
net/tipc/name_table.h
net/tipc/node.c
net/tipc/node.h
net/tipc/socket.c
net/tipc/socket.h