mac80211: mesh: fix missing unlock on error in table_path_del()
Subsystems (3)
Johannes Berg
maintainerPATCH 1/1 mac80211: mesh: fix missing unlock on error in table_path_del()
From: Wei Yongjun <[email protected]>
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.
---
Dave, can you take this directly? I see little value in sending a pull request for this one patch (but if you prefer can do so.)
--- net/mac80211/mesh_pathtbl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/mac80211/mesh_pathtbl.c +1 -1
@@ -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 ; }
Signature · 1 line
2.17.2
From: Johannes Berg <[email protected]>
Date: Mon, 18 Feb 2019 11:29:29 +0100
Quoted 6 lines
From: Wei Yongjun <[email protected]>
spin_lock_bh()is used intable_path_del()butrcu_read_unlock()is used for unlocking. Fix it by usingspin_unlock_bh()instead ofrcu_read_unlock()in the error handling case.
Quoted 7 lines
Fixes b4c3fbe63601 ("mac80211: Use linked list instead of rhashtable walk for mesh tables")Acked-by Herbert Xu <[email protected]>Signed-off-by Wei Yongjun <[email protected]>Signed-off-by Johannes Berg <[email protected]>---
Dave, can you take this directly? I see little value in sending a pull request for this one patch (but if you prefer can do so.)
Applied, thanks Johannes.