diff options
author | Mark Brown <broonie@linaro.org> | 2013-08-22 11:09:03 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-08-22 11:09:03 +0100 |
commit | 64393c6e647c8a791243063d282c787b46721be7 (patch) | |
tree | 89ca12bd5d52e8df24d2bc13a36d30479a4e825d /net/8021q/vlan_dev.c | |
parent | a2388a498ad2f85be01aca29e364abf427d9b53c (diff) | |
parent | 741a509f34d8d702f70d0ad99b8152c57d76961e (diff) |
Merge remote-tracking branch 'asoc/topic/ac97' into asoc-fsl
Diffstat (limited to 'net/8021q/vlan_dev.c')
-rw-r--r-- | net/8021q/vlan_dev.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index 3a8c8fd63c88..1cd3d2a406f5 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c @@ -73,6 +73,8 @@ vlan_dev_get_egress_qos_mask(struct net_device *dev, struct sk_buff *skb) { struct vlan_priority_tci_mapping *mp; + smp_rmb(); /* coupled with smp_wmb() in vlan_dev_set_egress_priority() */ + mp = vlan_dev_priv(dev)->egress_priority_map[(skb->priority & 0xF)]; while (mp) { if (mp->priority == skb->priority) { @@ -249,6 +251,11 @@ int vlan_dev_set_egress_priority(const struct net_device *dev, np->next = mp; np->priority = skb_prio; np->vlan_qos = vlan_qos; + /* Before inserting this element in hash table, make sure all its fields + * are committed to memory. + * coupled with smp_rmb() in vlan_dev_get_egress_qos_mask() + */ + smp_wmb(); vlan->egress_priority_map[skb_prio & 0xF] = np; if (vlan_qos) vlan->nr_egress_mappings++; |