Subject: Re: [PATCH V2 01/12] bridge: Add vlan filtering infrastructure

From: Vlad Yasevich <[email-masked]>
Date: Tue, 18 Dec 2012 16:26:30 -0500

On 12/18/2012 04:13 PM, Eric Dumazet wrote:
> On Tue, 2012-12-18 at 14:00 -0500, Vlad Yasevich wrote:
>
>> +static void br_vlan_destroy(struct net_bridge_vlan *vlan)
>> +{
>> +	if (!bitmap_empty(vlan->port_bitmap, PORT_BITMAP_LEN)) {
>> +		pr_err("Attempt to delete a VLAN %d from the bridge with "
>> +		       "non-empty port bitmap (%p)\n", vlan->vid, vlan);
>> +		BUG();
>> +	}
>> +
>> +	hlist_del_rcu(&vlan->hlist);
>> +	synchronize_net();
>> +	kfree_rcu(vlan, rcu);
>> +}
>
> Not clear why you both use synchronize_net() and kfree_rcu()
>

I think this was a left-over from old code.  I think this was
originally here to mimic del_nbp behavior, but I don't think
it's really needed as kfree_rcu should wait until all current
rcu section have completed.

-vlad