netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch net] tipc: fix a missing rhashtable_walk_exit()
@ 2018-08-23 23:19 Cong Wang
  2018-08-30  0:59 ` David Miller
  2018-09-04  9:13 ` Ying Xue
  0 siblings, 2 replies; 3+ messages in thread
From: Cong Wang @ 2018-08-23 23:19 UTC (permalink / raw)
  To: netdev; +Cc: Cong Wang, Herbert Xu, Ying Xue

rhashtable_walk_exit() must be paired with rhashtable_walk_enter().

Fixes: 40f9f4397060 ("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>
---
 net/tipc/socket.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index c1e93c9515bc..c9a50b62c738 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -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)
-- 
2.14.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Patch net] tipc: fix a missing rhashtable_walk_exit()
  2018-08-23 23:19 [Patch net] tipc: fix a missing rhashtable_walk_exit() Cong Wang
@ 2018-08-30  0:59 ` David Miller
  2018-09-04  9:13 ` Ying Xue
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2018-08-30  0:59 UTC (permalink / raw)
  To: xiyou.wangcong; +Cc: netdev, herbert, ying.xue

From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Thu, 23 Aug 2018 16:19:44 -0700

> rhashtable_walk_exit() must be paired with rhashtable_walk_enter().
> 
> Fixes: 40f9f4397060 ("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>

Applied and queued up for -stable, thanks Cong.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Patch net] tipc: fix a missing rhashtable_walk_exit()
  2018-08-23 23:19 [Patch net] tipc: fix a missing rhashtable_walk_exit() Cong Wang
  2018-08-30  0:59 ` David Miller
@ 2018-09-04  9:13 ` Ying Xue
  1 sibling, 0 replies; 3+ messages in thread
From: Ying Xue @ 2018-09-04  9:13 UTC (permalink / raw)
  To: Cong Wang, netdev; +Cc: Herbert Xu

On 08/24/2018 07:19 AM, Cong Wang wrote:
> rhashtable_walk_exit() must be paired with rhashtable_walk_enter().
> 
> Fixes: 40f9f4397060 ("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>

Acked-by: Ying Xue <ying.xue@windriver.com>

> ---
>  net/tipc/socket.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/net/tipc/socket.c b/net/tipc/socket.c
> index c1e93c9515bc..c9a50b62c738 100644
> --- a/net/tipc/socket.c
> +++ b/net/tipc/socket.c
> @@ -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)
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-09-04 13:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-23 23:19 [Patch net] tipc: fix a missing rhashtable_walk_exit() Cong Wang
2018-08-30  0:59 ` David Miller
2018-09-04  9:13 ` Ying Xue

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).