Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122698
b: refs/heads/master
c: 448eb71
h: refs/heads/master
v: v3
  • Loading branch information
Ilpo Järvinen authored and David S. Miller committed Dec 15, 2008
1 parent 6136809 commit 5682f0d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 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: 5ce1bbb97bf1e6707102d30499e7feaa1e6a2134
refs/heads/master: 448eb71f40120a8fd11ebd58153c271c63e6f862
25 changes: 14 additions & 11 deletions trunk/net/ipv6/mcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,20 +303,23 @@ static struct inet6_dev *ip6_mc_find_dev(struct net *net,
dev = dev_get_by_index(net, ifindex);

if (!dev)
return NULL;
goto nodev;
idev = in6_dev_get(dev);
if (!idev) {
dev_put(dev);
return NULL;
}
if (!idev)
goto release;
read_lock_bh(&idev->lock);
if (idev->dead) {
read_unlock_bh(&idev->lock);
in6_dev_put(idev);
dev_put(dev);
return NULL;
}
if (idev->dead)
goto unlock_release;

return idev;

unlock_release:
read_unlock_bh(&idev->lock);
in6_dev_put(idev);
release:
dev_put(dev);
nodev:
return NULL;
}

void ipv6_sock_mc_close(struct sock *sk)
Expand Down

0 comments on commit 5682f0d

Please sign in to comment.