Re: [PATCH] net: TCP early demux cleanup
From: David Miller <davem@davemloft.net>
Date: 2012-07-30 21:54:32
From: David Miller <davem@davemloft.net>
Date: 2012-07-30 21:54:32
From: Eric Dumazet <redacted> Date: Mon, 30 Jul 2012 09:06:13 +0200
From: Eric Dumazet <edumazet@google.com> early_demux() handlers should be called in RCU context, and as we use skb_dst_set_noref(skb, dst), caller must not exit from RCU context before dst use (skb_dst(skb)) or release (skb_drop(dst)) Therefore, rcu_read_lock()/rcu_read_unlock() pairs around ->early_demux() are confusing and not needed : Protocol handlers are already in an RCU read lock section. (__netif_receive_skb() does the rcu_read_lock() ) Signed-off-by: Eric Dumazet <edumazet@google.com>
I wondered about this very issue when I wrote this code, thanks for clearing things up. Applied.