vlan: fix a race in egress prio management
authorEric Dumazet <edumazet@google.com>
Thu, 18 Jul 2013 16:35:10 +0000 (09:35 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 28 Jul 2013 23:26:08 +0000 (16:26 -0700)
commit4ae71fc80a0d7efdec8d1218cf188240eb655f38
treec063fd96db18200da72b86670751f1ac0e94a3c4
parentb64a172c19b49fb8583efc379535341cc537cfc2
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/8021q/vlan_dev.c