Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 224958
b: refs/heads/master
c: 4c0833b
h: refs/heads/master
v: v3
  • Loading branch information
Tobias Klauser authored and David S. Miller committed Dec 10, 2010
1 parent 4cad91d commit f021ae8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 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: eaa7dcde1d092c792cbca4be81d2e506e84c6122
refs/heads/master: 4c0833bcd4d302fe783b9f8286a00ca2999d6200
10 changes: 6 additions & 4 deletions trunk/net/bridge/br_multicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -654,11 +654,13 @@ static struct net_bridge_mdb_entry *br_multicast_new_group(
struct net_bridge_mdb_htable *mdb;
struct net_bridge_mdb_entry *mp;
int hash;
int err;

mdb = rcu_dereference_protected(br->mdb, 1);
if (!mdb) {
if (br_mdb_rehash(&br->mdb, BR_HASH_SIZE, 0))
return NULL;
err = br_mdb_rehash(&br->mdb, BR_HASH_SIZE, 0);
if (err)
return ERR_PTR(err);
goto rehash;
}

Expand All @@ -680,7 +682,7 @@ static struct net_bridge_mdb_entry *br_multicast_new_group(

mp = kzalloc(sizeof(*mp), GFP_ATOMIC);
if (unlikely(!mp))
goto out;
return ERR_PTR(-ENOMEM);

mp->br = br;
mp->addr = *group;
Expand Down Expand Up @@ -713,7 +715,7 @@ static int br_multicast_add_group(struct net_bridge *br,

mp = br_multicast_new_group(br, port, group);
err = PTR_ERR(mp);
if (unlikely(IS_ERR(mp) || !mp))
if (IS_ERR(mp))
goto err;

if (!port) {
Expand Down

0 comments on commit f021ae8

Please sign in to comment.