Thread (4 messages) 4 messages, 2 authors, 2004-08-25

Re: [PATCH 2.6] deliver_skb cleanup

From: Stephen Hemminger <hidden>
Date: 2004-08-24 18:35:37

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: Stephen Hemminger <redacted>
 
diff -Nru a/net/core/dev.c b/net/core/dev.c
--- a/net/core/dev.c	2004-08-24 11:34:41 -07:00
+++ b/net/core/dev.c	2004-08-24 11:34:41 -07:00
@@ -1779,15 +1779,16 @@
 	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) 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help