]> 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)
commit3972f59910d2cccbc12166d74ca864a1c0797c88
tree5f87a0e7419248212efa433802b3a5cc39583dcb
parent5ee25f90b1807ae3a35cbad76581728144ab6eec
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