vlan: fix a race in egress prio management
commit28a7606fe1d4cdae19bf6cea88f33df13f543e2a
authorEric Dumazet <edumazet@google.com>
Thu, 18 Jul 2013 16:35:10 +0000 (18 09:35 -0700)
committerWilly Tarreau <w@1wt.eu>
Mon, 19 May 2014 05:53:47 +0000 (19 07:53 +0200)
tree9405ea942e46ae982f726f9727111bbd1a05fd1f
parent5393c4b20b6fe78df930a0fe1821ec72ba735541
vlan: fix a race in egress prio management

[ Upstream commit 3e3aac497513c669e1c62c71e1d552ea85c1d974 ]

egress_priority_map[] hash table updates are protected by rtnl,
and we never remove elements until device is dismantled.

We have to make sure that before inserting an new element in hash table,
all its fields are committed to memory or else another cpu could
find corrupt values and crash.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Willy Tarreau <w@1wt.eu>
net/8021q/vlan_dev.c