Re: [PATCH] fasync: Fix deadlock between task-context and interrupt-context kill_fasync()

2018-04-27 Thread Boqun Feng
On Tue, Apr 17, 2018 at 07:01:10AM -0700, Matthew Wilcox wrote: > On Thu, Apr 05, 2018 at 02:58:06PM +0300, Kirill Tkhai wrote: > > I observed the following deadlock between them: > > > > [task 1] [task 2] [task 3] > > kill_fasync()

Re: [PATCH] fasync: Fix deadlock between task-context and interrupt-context kill_fasync()

2018-04-27 Thread Boqun Feng
On Tue, Apr 17, 2018 at 07:01:10AM -0700, Matthew Wilcox wrote: > On Thu, Apr 05, 2018 at 02:58:06PM +0300, Kirill Tkhai wrote: > > I observed the following deadlock between them: > > > > [task 1] [task 2] [task 3] > > kill_fasync()

Re: [PATCH] fasync: Fix deadlock between task-context and interrupt-context kill_fasync()

2018-04-18 Thread Kirill Tkhai
On 18.04.2018 23:00, Jeff Layton wrote: > On Tue, 2018-04-17 at 17:15 +0300, Kirill Tkhai wrote: >> On 17.04.2018 17:01, Matthew Wilcox wrote: >>> On Thu, Apr 05, 2018 at 02:58:06PM +0300, Kirill Tkhai wrote: I observed the following deadlock between them: [task 1]

Re: [PATCH] fasync: Fix deadlock between task-context and interrupt-context kill_fasync()

2018-04-18 Thread Kirill Tkhai
On 18.04.2018 23:00, Jeff Layton wrote: > On Tue, 2018-04-17 at 17:15 +0300, Kirill Tkhai wrote: >> On 17.04.2018 17:01, Matthew Wilcox wrote: >>> On Thu, Apr 05, 2018 at 02:58:06PM +0300, Kirill Tkhai wrote: I observed the following deadlock between them: [task 1]

Re: [PATCH] fasync: Fix deadlock between task-context and interrupt-context kill_fasync()

2018-04-18 Thread Jeff Layton
On Tue, 2018-04-17 at 17:15 +0300, Kirill Tkhai wrote: > On 17.04.2018 17:01, Matthew Wilcox wrote: > > On Thu, Apr 05, 2018 at 02:58:06PM +0300, Kirill Tkhai wrote: > > > I observed the following deadlock between them: > > > > > > [task 1] [task 2]

Re: [PATCH] fasync: Fix deadlock between task-context and interrupt-context kill_fasync()

2018-04-18 Thread Jeff Layton
On Tue, 2018-04-17 at 17:15 +0300, Kirill Tkhai wrote: > On 17.04.2018 17:01, Matthew Wilcox wrote: > > On Thu, Apr 05, 2018 at 02:58:06PM +0300, Kirill Tkhai wrote: > > > I observed the following deadlock between them: > > > > > > [task 1] [task 2]

Re: [PATCH] fasync: Fix deadlock between task-context and interrupt-context kill_fasync()

2018-04-17 Thread Kirill Tkhai
On 17.04.2018 17:01, Matthew Wilcox wrote: > On Thu, Apr 05, 2018 at 02:58:06PM +0300, Kirill Tkhai wrote: >> I observed the following deadlock between them: >> >> [task 1] [task 2] [task 3] >> kill_fasync()

Re: [PATCH] fasync: Fix deadlock between task-context and interrupt-context kill_fasync()

2018-04-17 Thread Kirill Tkhai
On 17.04.2018 17:01, Matthew Wilcox wrote: > On Thu, Apr 05, 2018 at 02:58:06PM +0300, Kirill Tkhai wrote: >> I observed the following deadlock between them: >> >> [task 1] [task 2] [task 3] >> kill_fasync()

Re: [PATCH] fasync: Fix deadlock between task-context and interrupt-context kill_fasync()

2018-04-17 Thread Matthew Wilcox
On Thu, Apr 05, 2018 at 02:58:06PM +0300, Kirill Tkhai wrote: > I observed the following deadlock between them: > > [task 1] [task 2] [task 3] > kill_fasync() mm_update_next_owner() > copy_process() >

Re: [PATCH] fasync: Fix deadlock between task-context and interrupt-context kill_fasync()

2018-04-17 Thread Matthew Wilcox
On Thu, Apr 05, 2018 at 02:58:06PM +0300, Kirill Tkhai wrote: > I observed the following deadlock between them: > > [task 1] [task 2] [task 3] > kill_fasync() mm_update_next_owner() > copy_process() >

Re: [PATCH] fasync: Fix deadlock between task-context and interrupt-context kill_fasync()

2018-04-17 Thread Kirill Tkhai
On 17.04.2018 16:31, Jeff Layton wrote: > On Tue, 2018-04-17 at 14:53 +0300, Kirill Tkhai wrote: >> Hi, Jeff, >> >> On 17.04.2018 14:42, Jeff Layton wrote: >>> On Thu, 2018-04-05 at 14:58 +0300, Kirill Tkhai wrote: I observed the following deadlock between them: [task 1]

Re: [PATCH] fasync: Fix deadlock between task-context and interrupt-context kill_fasync()

2018-04-17 Thread Kirill Tkhai
On 17.04.2018 16:31, Jeff Layton wrote: > On Tue, 2018-04-17 at 14:53 +0300, Kirill Tkhai wrote: >> Hi, Jeff, >> >> On 17.04.2018 14:42, Jeff Layton wrote: >>> On Thu, 2018-04-05 at 14:58 +0300, Kirill Tkhai wrote: I observed the following deadlock between them: [task 1]

Re: [PATCH] fasync: Fix deadlock between task-context and interrupt-context kill_fasync()

2018-04-17 Thread Jeff Layton
On Tue, 2018-04-17 at 14:53 +0300, Kirill Tkhai wrote: > Hi, Jeff, > > On 17.04.2018 14:42, Jeff Layton wrote: > > On Thu, 2018-04-05 at 14:58 +0300, Kirill Tkhai wrote: > > > I observed the following deadlock between them: > > > > > > [task 1] [task 2]

Re: [PATCH] fasync: Fix deadlock between task-context and interrupt-context kill_fasync()

2018-04-17 Thread Jeff Layton
On Tue, 2018-04-17 at 14:53 +0300, Kirill Tkhai wrote: > Hi, Jeff, > > On 17.04.2018 14:42, Jeff Layton wrote: > > On Thu, 2018-04-05 at 14:58 +0300, Kirill Tkhai wrote: > > > I observed the following deadlock between them: > > > > > > [task 1] [task 2]

Re: [PATCH] fasync: Fix deadlock between task-context and interrupt-context kill_fasync()

2018-04-17 Thread Kirill Tkhai
Hi, Jeff, On 17.04.2018 14:42, Jeff Layton wrote: > On Thu, 2018-04-05 at 14:58 +0300, Kirill Tkhai wrote: >> I observed the following deadlock between them: >> >> [task 1] [task 2] [task 3] >> kill_fasync()

Re: [PATCH] fasync: Fix deadlock between task-context and interrupt-context kill_fasync()

2018-04-17 Thread Kirill Tkhai
Hi, Jeff, On 17.04.2018 14:42, Jeff Layton wrote: > On Thu, 2018-04-05 at 14:58 +0300, Kirill Tkhai wrote: >> I observed the following deadlock between them: >> >> [task 1] [task 2] [task 3] >> kill_fasync()

Re: [PATCH] fasync: Fix deadlock between task-context and interrupt-context kill_fasync()

2018-04-17 Thread Jeff Layton
On Thu, 2018-04-05 at 14:58 +0300, Kirill Tkhai wrote: > I observed the following deadlock between them: > > [task 1] [task 2] [task 3] > kill_fasync() mm_update_next_owner() > copy_process() >

Re: [PATCH] fasync: Fix deadlock between task-context and interrupt-context kill_fasync()

2018-04-17 Thread Jeff Layton
On Thu, 2018-04-05 at 14:58 +0300, Kirill Tkhai wrote: > I observed the following deadlock between them: > > [task 1] [task 2] [task 3] > kill_fasync() mm_update_next_owner() > copy_process() >

Re: [PATCH] fasync: Fix deadlock between task-context and interrupt-context kill_fasync()

2018-04-17 Thread Kirill Tkhai
Hi, almost two weeks passed, while there is no reaction. Jeff, Bruce, what is your point of view? Just to underline, the problem is because of rw_lock fairness, which does not allow a reader to take a read locked lock in case of there is already a writer called write_lock(). See

Re: [PATCH] fasync: Fix deadlock between task-context and interrupt-context kill_fasync()

2018-04-17 Thread Kirill Tkhai
Hi, almost two weeks passed, while there is no reaction. Jeff, Bruce, what is your point of view? Just to underline, the problem is because of rw_lock fairness, which does not allow a reader to take a read locked lock in case of there is already a writer called write_lock(). See

[PATCH] fasync: Fix deadlock between task-context and interrupt-context kill_fasync()

2018-04-05 Thread Kirill Tkhai
I observed the following deadlock between them: [task 1] [task 2] [task 3] kill_fasync() mm_update_next_owner() copy_process() spin_lock_irqsave(>fa_lock) read_lock(_lock) write_lock_irq(_lock)

[PATCH] fasync: Fix deadlock between task-context and interrupt-context kill_fasync()

2018-04-05 Thread Kirill Tkhai
I observed the following deadlock between them: [task 1] [task 2] [task 3] kill_fasync() mm_update_next_owner() copy_process() spin_lock_irqsave(>fa_lock) read_lock(_lock) write_lock_irq(_lock)