vlan: fix a race in egress prio management
authorEric Dumazet <edumazet@google.com>
Thu, 18 Jul 2013 16:35:10 +0000 (09:35 -0700)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 2 Aug 2013 20:14:50 +0000 (22:14 +0200)
commitff3599bb956435966cf801d25e6c047502f3165a
tree58912b0966d9ee8f3e528e94ba2bcb34ac913e61
parent729c5244dac355ca8c81f402739c218cc3212a10
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: Ben Hutchings <ben@decadent.org.uk>
net/8021q/vlan_dev.c