]> git.baikalelectronics.ru Git - kernel.git/commitdiff
tipc: fix a missing rhashtable_walk_exit()
authorCong Wang <xiyou.wangcong@gmail.com>
Thu, 23 Aug 2018 23:19:44 +0000 (16:19 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Aug 2018 00:52:58 +0000 (17:52 -0700)
rhashtable_walk_exit() must be paired with rhashtable_walk_enter().

Fixes: e77ddc48def1 ("tipc: Fix tipc_sk_reinit race conditions")
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/socket.c

index c1e93c9515bca5abaae647f18402a8bc25bfa2b4..c9a50b62c738d3ec3220e55650715003b6f04169 100644 (file)
@@ -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)