mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-29 22:07:43 +09:00
mac80211: mesh: fix missing unlock on error in table_path_del()
[ Upstream commitf2ffff085d] 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:b4c3fbe636("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e2379b044d
commit
04096b3bea
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user