Skip to content

Commit f2ffff0

Browse files
Wei Yongjundavem330
authored andcommitted
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: b4c3fbe ("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>
1 parent 21d2cb4 commit f2ffff0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/mac80211/mesh_pathtbl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ static int table_path_del(struct mesh_table *tbl,
627627
spin_lock_bh(&tbl->walk_lock);
628628
mpath = rhashtable_lookup_fast(&tbl->rhead, addr, mesh_rht_params);
629629
if (!mpath) {
630-
rcu_read_unlock();
630+
spin_unlock_bh(&tbl->walk_lock);
631631
return -ENXIO;
632632
}
633633

0 commit comments

Comments
 (0)