[VLAN] spin lock question

Stephen Hemminger shemminger at osdl.org
Mon Oct 9 15:04:47 PDT 2006


On Mon, 9 Oct 2006 12:39:44 -0700
Stephen Hemminger <shemminger at osdl.org> wrote:

> On Fri, 06 Oct 2006 09:48:27 +0100
> Alex Zeffertt <ajz at cambridgebroadband.com> wrote:
> 
> > Hi list,
> > 
> > I've been reading through the 8021q.o module source recently and
> > I am confused by the choice of spin lock used in the following
> > code:
> > 
> > 
> > int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
> >                    struct packet_type* ptype)
> > {
> > 	...
> > 	spin_lock_bh(&vlan_group_lock);
> > 	skb->dev = __find_vlan_dev(dev, vid);
> > 	if (!skb->dev) {
> > 		spin_unlock_bh(&vlan_group_lock);
> > 	...
> > 
> 
> That code should use RCU actually.

That's what 2.6 already does.
> 


-- 
Stephen Hemminger <shemminger at osdl.org>


More information about the Vlan mailing list