Re: Deadlock in do_page_fault() on ARM (old kernel)

2014-01-20 Thread Alan Ott
On 01/17/2014 08:20 PM, Russell King - ARM Linux wrote: On Fri, Jan 17, 2014 at 07:57:16PM -0500, Alan Ott wrote: On 01/17/2014 08:46 AM, Russell King - ARM Linux wrote: My suspicion therefore is that some other thread must have died while holding the mmap_sem, so there's probably a kernel oops

Re: Deadlock in do_page_fault() on ARM (old kernel)

2014-01-20 Thread Michal Hocko
On Mon 20-01-14 11:15:09, Michal Hocko wrote: > On Wed 15-01-14 20:13:04, Alan Ott wrote: > [...] > > 2. __copy_to_user_memcpy() takes a read lock (down_read()) on > > This looks like a bug. copy_to_user_* shouldn't take mmap_sem at all > Check the might_fault annotation used in generic code. Arm

Re: Deadlock in do_page_fault() on ARM (old kernel)

2014-01-20 Thread Michal Hocko
On Wed 15-01-14 20:13:04, Alan Ott wrote: [...] > 2. __copy_to_user_memcpy() takes a read lock (down_read()) on This looks like a bug. copy_to_user_* shouldn't take mmap_sem at all Check the might_fault annotation used in generic code. Arm version of copy_to_user* doesn't seem to use the annotatio

Re: Deadlock in do_page_fault() on ARM (old kernel)

2014-01-17 Thread Russell King - ARM Linux
On Fri, Jan 17, 2014 at 07:57:16PM -0500, Alan Ott wrote: > On 01/17/2014 08:46 AM, Russell King - ARM Linux wrote: >> My suspicion therefore is that some other thread must have died while >> holding the mmap_sem, so there's probably a kernel oops earlier... >> that's my best guess at the moment wi

Re: Deadlock in do_page_fault() on ARM (old kernel)

2014-01-17 Thread Alan Ott
On 01/17/2014 08:46 AM, Russell King - ARM Linux wrote: On Wed, Jan 15, 2014 at 08:13:04PM -0500, Alan Ott wrote: So my questions are: 1. Why don't I see a full backtrace beyond the exception stack? It's the same when dump_stack() is called manually. No idea - it looks like you're not using fra

Re: Deadlock in do_page_fault() on ARM (old kernel)

2014-01-17 Thread Russell King - ARM Linux
On Wed, Jan 15, 2014 at 08:13:04PM -0500, Alan Ott wrote: > So my questions are: > 1. Why don't I see a full backtrace beyond the exception stack? It's the > same when dump_stack() is called manually. No idea - it looks like you're not using frame pointers, but are using the unwinder. Full back

Deadlock in do_page_fault() on ARM (old kernel)

2014-01-15 Thread Alan Ott
Hello, I have a deadlock that I'm trying to understand. The symptom is multiple tasks trying to acquire a read lock (down_read()) on mm->mmap_sem in do_page_fault(). I'll be right up front and say that this is a fairly old kernel (2.6.37 TI PSP kernel) on a fairly old processor DaVinci 6446.