Re: [PATCH net] netns: fix a deadlock in peernet2id_alloc()

2020-09-07 Thread Taehee Yoo
On Mon, 7 Sep 2020 at 22:55, Guillaume Nault wrote: > Hi Guillaume, Thank you for the review! > On Sun, Sep 06, 2020 at 02:34:04PM +, Taehee Yoo wrote: > > To protect netns id, the nsid_lock is used when netns id is being > > allocated and removed by peernet2id_alloc() and unhash_nsid(). > >

Re: [PATCH net] netns: fix a deadlock in peernet2id_alloc()

2020-09-07 Thread Guillaume Nault
On Sun, Sep 06, 2020 at 02:34:04PM +, Taehee Yoo wrote: > To protect netns id, the nsid_lock is used when netns id is being > allocated and removed by peernet2id_alloc() and unhash_nsid(). > The nsid_lock can be used in BH context but only spin_lock() is used > in this code. > Using spin_lock()

[PATCH net] netns: fix a deadlock in peernet2id_alloc()

2020-09-06 Thread Taehee Yoo
To protect netns id, the nsid_lock is used when netns id is being allocated and removed by peernet2id_alloc() and unhash_nsid(). The nsid_lock can be used in BH context but only spin_lock() is used in this code. Using spin_lock() instead of spin_lock_bh() can result in a deadlock in the following s