Skip to content

Commit

Permalink
tipc: fix a missing rhashtable_walk_exit()
Browse files Browse the repository at this point in the history
rhashtable_walk_exit() must be paired with rhashtable_walk_enter().

Fixes: 40f9f43 ("tipc: Fix tipc_sk_reinit race conditions")
Cc: Herbert Xu <[email protected]>
Cc: Ying Xue <[email protected]>
Signed-off-by: Cong Wang <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
congwang authored and davem330 committed Aug 30, 2018
1 parent 9f28954 commit bd583fe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/tipc/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit bd583fe

Please sign in to comment.