Re: [Patch net] tipc: use lock_sock() in tipc_sk_reinit()

2018-12-14 Thread David Miller
From: Cong Wang 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

Re: [Patch net] tipc: use lock_sock() in tipc_sk_reinit()

2018-12-10 Thread Dmitry Vyukov
On Mon, Dec 10, 2018 at 8:50 PM Cong Wang wrote: > > 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

[Patch net] tipc: use lock_sock() in tipc_sk_reinit()

2018-12-10 Thread Cong Wang
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