[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20181214.132037.860956453591088348.davem@davemloft.net>
Date: Fri, 14 Dec 2018 13:20:37 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: xiyou.wangcong@...il.com
Cc: netdev@...r.kernel.org, dvyukov@...gle.com, ying.xue@...driver.com,
jon.maloy@...csson.com
Subject: Re: [Patch net] tipc: use lock_sock() in tipc_sk_reinit()
From: Cong Wang <xiyou.wangcong@...il.com>
Date: Mon, 10 Dec 2018 11:49:55 -0800
> lock_sock() must be used in process context to be race-free with
> other lock_sock() callers, for example, tipc_release(). Otherwise
> using the spinlock directly can't serialize a parallel tipc_release().
>
> As it is blocking, we have to hold the sock refcnt before
> rhashtable_walk_stop() and release it after rhashtable_walk_start().
>
> Fixes: 07f6c4bc048a ("tipc: convert tipc reference table to use generic rhashtable")
> Reported-by: Dmitry Vyukov <dvyukov@...gle.com>
> Cc: Ying Xue <ying.xue@...driver.com>
> Cc: Jon Maloy <jon.maloy@...csson.com>
> Signed-off-by: Cong Wang <xiyou.wangcong@...il.com>
Applied and queued up for -stable.
Powered by blists - more mailing lists