diff options
Diffstat (limited to 'net/phonet/pn_dev.c')
-rw-r--r-- | net/phonet/pn_dev.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/phonet/pn_dev.c b/net/phonet/pn_dev.c index b18e48fae975..947038ddd04c 100644 --- a/net/phonet/pn_dev.c +++ b/net/phonet/pn_dev.c | |||
@@ -292,8 +292,7 @@ static void phonet_route_autodel(struct net_device *dev) | |||
292 | if (bitmap_empty(deleted, 64)) | 292 | if (bitmap_empty(deleted, 64)) |
293 | return; /* short-circuit RCU */ | 293 | return; /* short-circuit RCU */ |
294 | synchronize_rcu(); | 294 | synchronize_rcu(); |
295 | for (i = find_first_bit(deleted, 64); i < 64; | 295 | for_each_set_bit(i, deleted, 64) { |
296 | i = find_next_bit(deleted, 64, i + 1)) { | ||
297 | rtm_phonet_notify(RTM_DELROUTE, dev, i); | 296 | rtm_phonet_notify(RTM_DELROUTE, dev, i); |
298 | dev_put(dev); | 297 | dev_put(dev); |
299 | } | 298 | } |
@@ -374,6 +373,7 @@ int __init phonet_device_init(void) | |||
374 | if (err) | 373 | if (err) |
375 | return err; | 374 | return err; |
376 | 375 | ||
376 | proc_net_fops_create(&init_net, "pnresource", 0, &pn_res_seq_fops); | ||
377 | register_netdevice_notifier(&phonet_device_notifier); | 377 | register_netdevice_notifier(&phonet_device_notifier); |
378 | err = phonet_netlink_register(); | 378 | err = phonet_netlink_register(); |
379 | if (err) | 379 | if (err) |
@@ -386,6 +386,7 @@ void phonet_device_exit(void) | |||
386 | rtnl_unregister_all(PF_PHONET); | 386 | rtnl_unregister_all(PF_PHONET); |
387 | unregister_netdevice_notifier(&phonet_device_notifier); | 387 | unregister_netdevice_notifier(&phonet_device_notifier); |
388 | unregister_pernet_device(&phonet_net_ops); | 388 | unregister_pernet_device(&phonet_net_ops); |
389 | proc_net_remove(&init_net, "pnresource"); | ||
389 | } | 390 | } |
390 | 391 | ||
391 | int phonet_route_add(struct net_device *dev, u8 daddr) | 392 | int phonet_route_add(struct net_device *dev, u8 daddr) |