summaryrefslogtreecommitdiffstats
path: root/net/x25
diff options
context:
space:
mode:
Diffstat (limited to 'net/x25')
-rw-r--r--net/x25/af_x25.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c
index e7f894e8e..a4f070023 100644
--- a/net/x25/af_x25.c
+++ b/net/x25/af_x25.c
@@ -1336,14 +1336,17 @@ int init_module(void)
/*
* Register any pre existing devices.
*/
- for (dev = dev_base; dev != NULL; dev = dev->next)
+ read_lock(&dev_base_lock);
+ for (dev = dev_base; dev != NULL; dev = dev->next) {
if ((dev->flags & IFF_UP) && (dev->type == ARPHRD_X25
#if defined(CONFIG_LLC) || defined(CONFIG_LLC_MODULE)
|| dev->type == ARPHRD_ETHER
#endif
- ))
- x25_link_device_up(dev);
-
+ ))
+ x25_link_device_up(dev);
+ }
+ read_unlock(&dev_base_lock);
+
return 0;
}