On Mon, 2017-03-13 at 15:36 +0100, Thierry Du Tre wrote:

> +void vlan_dev_flush_egress_priority(const struct net_device *dev)
> +{
> +     struct vlan_dev_priv *vlan = vlan_dev_priv(dev);
> +     struct vlan_priority_tci_mapping *mp;
> +     int i;
> +
> +     for (i = 0; i < ARRAY_SIZE(vlan->egress_priority_map); i++) {
> +             while ((mp = vlan->egress_priority_map[i]) != NULL) {
> +                     vlan->egress_priority_map[i] = mp->next;
> +                     kfree(mp);
> +             }
> +     }
> +     vlan->nr_egress_mappings = 0;
> +}


Are you doing this on a live device ?

Looks you'll need proper RCU support then.

Otherwise, crashes will happen, say in egress_priority_map()

smp_rmb() wont be enough if items can now be destroyed.



Reply via email to