]> git.baikalelectronics.ru Git - kernel.git/commit
vxlan: fix igmp races
authorstephen hemminger <stephen@networkplumber.org>
Thu, 18 Jul 2013 15:40:15 +0000 (08:40 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 20 Jul 2013 00:07:25 +0000 (17:07 -0700)
commit367a9ad335e63ccccaf41a5ac316b6ab2c4d1853
tree5f87a0e7419248212efa433802b3a5cc39583dcb
parenta7304dd64a17c3968fa4a6aafe8e728b02298448
vxlan: fix igmp races

There are two race conditions in existing code for doing IGMP
management in workqueue in vxlan. First, the vxlan_group_used
function checks the list of vxlan's without any protection, and
it is possible for open followed by close to occur before the
igmp work queue runs.

To solve these move the check into vxlan_open/stop so it is
protected by RTNL. And split into two work structures so that
there is no racy reference to underlying device state.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vxlan.c