提交 ac95766d 编写于 作者: W Wei Yongjun 提交者: Xie XiuQi

mac80211: mesh: fix missing unlock on error in table_path_del()

[ Upstream commit f2ffff08 ]

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: b4c3fbe6 ("mac80211: Use linked list instead of rhashtable walk for mesh tables")
Acked-by: NHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 26708ae9
...@@ -627,7 +627,7 @@ static int table_path_del(struct mesh_table *tbl, ...@@ -627,7 +627,7 @@ static int table_path_del(struct mesh_table *tbl,
spin_lock_bh(&tbl->walk_lock); spin_lock_bh(&tbl->walk_lock);
mpath = rhashtable_lookup_fast(&tbl->rhead, addr, mesh_rht_params); mpath = rhashtable_lookup_fast(&tbl->rhead, addr, mesh_rht_params);
if (!mpath) { if (!mpath) {
rcu_read_unlock(); spin_unlock_bh(&tbl->walk_lock);
return -ENXIO; return -ENXIO;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册