Skip to contentSkip to conversation

tipc: fix a missing rhashtable_walk_exit()

PATCH In review Cong Wang 3 participants 3 messages Aug 24, 2018 – Sep 4, 2018

Subsystems (3)
lore
Share & tools
lore

Cong Wang

author
#0 lore raw

PATCH 1/1 tipc: fix a missing rhashtable_walk_exit()

rhashtable_walk_exit() must be paired with rhashtable_walk_enter().

Fixes 40f9f4397060 ("tipc: Fix tipc_sk_reinit race conditions")
Cc Herbert Xu <[email protected]>
Cc Ying Xue <[email protected]>
---
 net/tipc/socket.c | 2 ++
 1 file changed, 2 insertions(+)
net/tipc/socket.c +2 -0
index c1e93c9515bc..c9a50b62c738 100644
@@ -2672,6 +2672,8 @@ void tipc_sk_reinit(struct net *net)
 
 		rhashtable_walk_stop(&iter);
 	} while (tsk == ERR_PTR(-EAGAIN));
+
+	rhashtable_walk_exit(&iter);
 }
 
 static struct tipc_sock *tipc_sk_lookup(struct net *net, u32 portid)
Signature · 1 line
2.14.4
Acked-by on v1 1/1
#2 lore raw
In reply to Cong Wang
Quoted 6 lines · Cong Wang

rhashtable_walk_exit() must be paired with rhashtable_walk_enter().

Fixes 40f9f4397060 ("tipc: Fix tipc_sk_reinit race conditions")
Cc Herbert Xu <[email protected]>
Cc Ying Xue <[email protected]>
Quoted 18 lines
---
 net/tipc/socket.c | 2 ++
 1 file changed, 2 insertions(+)
net/tipc/socket.c +2 -0
index c1e93c9515bc..c9a50b62c738 100644
@@ -2672,6 +2672,8 @@ void tipc_sk_reinit(struct net *net)
 
 		rhashtable_walk_stop(&iter);
 	} while (tsk == ERR_PTR(-EAGAIN));
+
+	rhashtable_walk_exit(&iter);
 }
 
 static struct tipc_sock *tipc_sk_lookup(struct net *net, u32 portid)