]> git.baikalelectronics.ru Git - kernel.git/commit
geneve: Simplify locking.
authorJesse Gross <jesse@nicira.com>
Sat, 3 Jan 2015 02:26:03 +0000 (18:26 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Jan 2015 03:21:33 +0000 (22:21 -0500)
commitb25977840c307a95abfdacf6dc0c1972bb8fa90e
tree89e2c3f0b5fe649dda54e9745f2ec413c6217a49
parent7f7e2c57af91165b191190af7a428d8c94be61ce
geneve: Simplify locking.

The existing Geneve locking scheme was pulled over directly from
VXLAN. However, VXLAN has a number of built in mechanisms which make
the locking more complex and are unlikely to be necessary with Geneve.
This simplifies the locking to use a basic scheme of a mutex
when doing updates plus RCU on receive.

In addition to making the code easier to read, this also avoids the
possibility of a race when creating or destroying sockets since
UDP sockets and the list of Geneve sockets are protected by different
locks. After this change, the entire operation is atomic.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/geneve.h
net/ipv4/geneve.c