[Bridge] Re: [PATCH] fix oops when mangling and brouting and tcpdumping packets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 24 Aug 2004 22:35:10 +0200
Bart De Schuymer <bdschuym@xxxxxxxxxx> wrote:

> On Tuesday 24 August 2004 20:38, Stephen Hemminger wrote:
> > How about this, it is basically Bart's patch with:
> > 	* some more cleanups to handle_bridge
> > 	* removing extra rcu_read_lock (already done in netif_receive_skb)
> > 	* pass bridge port to hook since already dereferenced in handle_bridge
> 
> Looks good.
> I'm not sure if the rcu_dereference() is needed, however. Can the bridge port 
> be removed while a packet is being processed? I thought the rcu_read_lock() 
> protects against that (del_nbp() does call_rcu(&p->rcu, destroy_nbp_rcu)).
> 
> cheers,
> Bart
> 
> 

rcu_read_lock is not really a lock, it just turns off preempt.
So, rcu_dereference is needed on CPU with weak consitency like Alpha.
It handles the case where a packet is processed between del_nbp() and destroy_nbp_rcu
where the bridge port still exists, but is being deleted.



[Index of Archives]     [Netdev]     [AoE Tools]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux