Re: [PATCH] powerpc: Fix possible deadlock on page fault

2013-09-05 Thread Aneesh Kumar K.V
Benjamin Herrenschmidt writes: > On Thu, 2013-09-05 at 17:18 +0530, Aneesh Kumar K.V wrote: >> Paul Mackerras writes: >> >> > On Thu, Sep 05, 2013 at 12:47:02PM +0530, Aneesh Kumar K.V wrote: >> > >> >> @@ -280,6 +280,13 @@ int __kprobes do_page_fault(struct pt_regs *regs, >> >> unsigned long

Re: [PATCH] powerpc: Fix possible deadlock on page fault

2013-09-05 Thread Benjamin Herrenschmidt
On Thu, 2013-09-05 at 17:18 +0530, Aneesh Kumar K.V wrote: > Paul Mackerras writes: > > > On Thu, Sep 05, 2013 at 12:47:02PM +0530, Aneesh Kumar K.V wrote: > > > >> @@ -280,6 +280,13 @@ int __kprobes do_page_fault(struct pt_regs *regs, > >> unsigned long address, > >> > >>perf_sw_event(PER

Re: [PATCH] powerpc: Fix possible deadlock on page fault

2013-09-05 Thread Aneesh Kumar K.V
Paul Mackerras writes: > On Thu, Sep 05, 2013 at 12:47:02PM +0530, Aneesh Kumar K.V wrote: > >> @@ -280,6 +280,13 @@ int __kprobes do_page_fault(struct pt_regs *regs, >> unsigned long address, >> >> perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address); >> >> +/* >> + * We

Re: [PATCH] powerpc: Fix possible deadlock on page fault

2013-09-05 Thread Paul Mackerras
On Thu, Sep 05, 2013 at 12:47:02PM +0530, Aneesh Kumar K.V wrote: > @@ -280,6 +280,13 @@ int __kprobes do_page_fault(struct pt_regs *regs, > unsigned long address, > > perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address); > > + /* > + * We want to do this outside mmap_sem

[PATCH] powerpc: Fix possible deadlock on page fault

2013-09-05 Thread Aneesh Kumar K.V
From: "Aneesh Kumar K.V" stack_grow_into/14082 is trying to acquire lock: (&mm->mmap_sem){++}, at: [] .might_fault+0x78/0xe0 but task is already holding lock: (&mm->mmap_sem){++}, at: [] .do_page_fault+0x24c/0x910 other info that might help us debug this: Possible unsafe lockin