OSDN Git Service

tipc: lock wakeup & inputq at tipc_link_reset()
authorParthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
Tue, 25 Sep 2018 20:09:10 +0000 (22:09 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Sep 2018 03:48:56 +0000 (20:48 -0700)
commit3f32d0be6c16b902b687453c962d17eea5b8ea19
treeef7a97c7382acbb5499b3c3c7ff44ffccd5f08c0
parent94b6ddce71780575fbbf9d2c36afc8440e61a281
tipc: lock wakeup & inputq at tipc_link_reset()

In tipc_link_reset() we copy the wakeup queue to input queue using
skb_queue_splice_init(link->wakeupq, link->inputq).
This is performed without holding any locks. The lists might be
simultaneously be accessed by other cpu threads in tipc_sk_rcv(),
something leading to to random missing packets.

Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/link.c