diff options
Diffstat (limited to 'net/bridge/br_fdb.c')
-rw-r--r-- | net/bridge/br_fdb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c index def2e403f932..8d566c13cc73 100644 --- a/net/bridge/br_fdb.c +++ b/net/bridge/br_fdb.c | |||
@@ -197,8 +197,8 @@ struct net_bridge_fdb_entry *br_fdb_get(struct net_bridge *br, | |||
197 | 197 | ||
198 | rcu_read_lock(); | 198 | rcu_read_lock(); |
199 | fdb = __br_fdb_get(br, addr); | 199 | fdb = __br_fdb_get(br, addr); |
200 | if (fdb) | 200 | if (fdb && !atomic_inc_not_zero(&fdb->use_count)) |
201 | atomic_inc(&fdb->use_count); | 201 | fdb = NULL; |
202 | rcu_read_unlock(); | 202 | rcu_read_unlock(); |
203 | return fdb; | 203 | return fdb; |
204 | } | 204 | } |