Commit edf361ab authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

[NET]: Another cleanup in netif_receive_skb()

Move rcu_read_lock up a little, since it needs to be
done in both branches anyway. Also whitespace fix.
Signed-off-by: default avatarStephen Hemminger <shemminger@osdl.org>
Signed-off-by: default avatarDavid S. Miller <davem@redhat.com>
parent 9fb9e414
......@@ -1773,15 +1773,16 @@ int netif_receive_skb(struct sk_buff *skb)
skb->mac_len = skb->nh.raw - skb->mac.raw;
pt_prev = NULL;
rcu_read_lock();
#ifdef CONFIG_NET_CLS_ACT
if (skb->tc_verd & TC_NCLS) {
skb->tc_verd = CLR_TC_NCLS(skb->tc_verd);
rcu_read_lock();
goto ncls;
}
#endif
#endif
rcu_read_lock();
list_for_each_entry_rcu(ptype, &ptype_all, list) {
if (!ptype->dev || ptype->dev == skb->dev) {
if (pt_prev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment