patch-2.3.4 linux/drivers/net/hamradio/bpqether.c

Next file: linux/drivers/net/irda/Config.in
Previous file: linux/drivers/net/eexpress.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.3/linux/drivers/net/hamradio/bpqether.c linux/drivers/net/hamradio/bpqether.c
@@ -641,11 +641,16 @@
 	});
 #endif
 
+	read_lock_bh(&dev_base_lock);
 	for (dev = dev_base; dev != NULL; dev = dev->next) {
-		if (dev_is_ethdev(dev))
+		if (dev_is_ethdev(dev)) {
+			read_unlock_bh(&dev_base_lock);
 			bpq_new_device(dev);
+			read_lock_bh(&dev_base_lock);
+		}
 	}
-
+	read_unlock_bh(&dev_base_lock);
+out:
 	return 0;
 }
 

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