Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 103452
b: refs/heads/master
c: 7af3db7
h: refs/heads/master
v: v3
  • Loading branch information
Wang Chen authored and David S. Miller committed Jul 15, 2008
1 parent 47b66e0 commit 0848ad2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5ae7b444137143a4e067b80354171ab128eb1b2b
refs/heads/master: 7af3db78a99f47b9ff40b8cb0bb08160ad6a3d6b
8 changes: 5 additions & 3 deletions trunk/net/ipv6/ip6mr.c
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ static struct net_device *ip6mr_reg_vif(void)
if (dev_open(dev))
goto failure;

dev_hold(dev);
return dev;

failure:
Expand Down Expand Up @@ -616,6 +617,7 @@ static int mif6_add(struct mif6ctl *vifc, int mrtsock)
err = dev_set_allmulti(dev, 1);
if (err) {
unregister_netdevice(dev);
dev_put(dev);
return err;
}
break;
Expand All @@ -624,10 +626,11 @@ static int mif6_add(struct mif6ctl *vifc, int mrtsock)
dev = dev_get_by_index(&init_net, vifc->mif6c_pifi);
if (!dev)
return -EADDRNOTAVAIL;
dev_put(dev);
err = dev_set_allmulti(dev, 1);
if (err)
if (err) {
dev_put(dev);
return err;
}
break;
default:
return -EINVAL;
Expand All @@ -651,7 +654,6 @@ static int mif6_add(struct mif6ctl *vifc, int mrtsock)

/* And finish update writing critical data */
write_lock_bh(&mrt_lock);
dev_hold(dev);
v->dev = dev;
#ifdef CONFIG_IPV6_PIMSM_V2
if (v->flags & MIFF_REGISTER)
Expand Down

0 comments on commit 0848ad2

Please sign in to comment.