patch-2.3.4 linux/net/sched/sch_api.c

Next file: linux/net/sched/sch_generic.c
Previous file: linux/net/rose/rose_route.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.3/linux/net/sched/sch_api.c linux/net/sched/sch_api.c
@@ -713,6 +713,7 @@
 
 	s_idx = cb->args[0];
 	s_q_idx = q_idx = cb->args[1];
+	read_lock_bh(&dev_base_lock);
 	for (dev=dev_base, idx=0; dev; dev = dev->next, idx++) {
 		if (idx < s_idx)
 			continue;
@@ -729,6 +730,8 @@
 	}
 
 done:
+	read_unlock_bh(&dev_base_lock);
+
 	cb->args[0] = idx;
 	cb->args[1] = q_idx;
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)