diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2019-02-18 11:29:29 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-02-19 01:29:54 +0100 |
commit | f2ffff085d287eec499f1fccd682796ad8010303 (patch) | |
tree | 357c8e966af32e8034d912743d1ac4efbb7359fd /net/mac80211/mesh_pathtbl.c | |
parent | net/mlx4_en: fix spelling mistake: "quiting" -> "quitting" (diff) | |
download | linux-f2ffff085d287eec499f1fccd682796ad8010303.tar.xz linux-f2ffff085d287eec499f1fccd682796ad8010303.zip |
mac80211: mesh: fix missing unlock on error in table_path_del()
spin_lock_bh() is used in table_path_del() but rcu_read_unlock()
is used for unlocking. Fix it by using spin_unlock_bh() instead
of rcu_read_unlock() in the error handling case.
Fixes: b4c3fbe63601 ("mac80211: Use linked list instead of rhashtable walk for mesh tables")
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | net/mac80211/mesh_pathtbl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c index c3a7396fb955..88a6d5e18ccc 100644 --- a/net/mac80211/mesh_pathtbl.c +++ b/net/mac80211/mesh_pathtbl.c @@ -627,7 +627,7 @@ static int table_path_del(struct mesh_table *tbl, spin_lock_bh(&tbl->walk_lock); mpath = rhashtable_lookup_fast(&tbl->rhead, addr, mesh_rht_params); if (!mpath) { - rcu_read_unlock(); + spin_unlock_bh(&tbl->walk_lock); return -ENXIO; } |