From: Cong Wang <[email protected]>
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 <[email protected]>
> Cc: Ying Xue <[email protected]>
> Cc: Jon Maloy <[email protected]>
> Signed-off-by: Cong Wang <[email protected]>
Applied and queued up for -stable.