Skip to contentSkip to conversation

2.6.23-rc4-mm1: deadlock while mmaping video device

DISCUSSION Jiri Slaby 2 participants 3 messages Sep 13, 2007

Subsystems (2)
lore
Share & tools
lore

Jiri Slaby

author
#0 lore raw

Hi,

I have this circular lock dependency on 2.6.23-rc4-mm1 when opening /dev/video0 and mmaping it. the v4l driver is stk11xx:
http://www.fi.muni.cz/~xslaby/sklad/panics/mm-deadlock.png

Using slub on x86_64 if that matters.

For now, I'm unable to set up a netconsole, so only the picture linked above is the best I have.

regards,

Signature · 8 lines
http://www.fi.muni.cz/~xslaby/            Jiri Slaby
faculty of informatics, masaryk university, brno, cz

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
maintainer
#1 lore raw
Quoted 11 lines · On Thu, 13 Sep 2007 13:43:43 +0200 Jiri Slaby <[email protected]> wrote:

Hi,

I have this circular lock dependency on 2.6.23-rc4-mm1 when opening /dev/video0 and mmaping it. the v4l driver is stk11xx:
http://www.fi.muni.cz/~xslaby/sklad/panics/mm-deadlock.png

Using slub on x86_64 if that matters.

For now, I'm unable to set up a netconsole, so only the picture linked above is the best I have.

oop, I think you'll want this:

mm/memory.c renamed from mm/memory.c~memory-controller-memory-accounting-v7-fix +4 -3
@@ -1135,7 +1135,7 @@ static int insert_page(struct mm_struct 
 {
 	int retval;
 	pte_t *pte;
-	spinlock_t *ptl;  
+	spinlock_t *ptl;
 
 	retval = mem_container_charge(page, mm);
 	if (retval)
@@ -1160,6 +1160,7 @@ static int insert_page(struct mm_struct 
 	set_pte_at(mm, addr, pte, mk_pte(page, prot));
 
 	retval = 0;
+	pte_unmap_unlock(pte, ptl);
 	return retval;
 out_unlock:
 	pte_unmap_unlock(pte, ptl);
@@ -2184,8 +2185,8 @@ static int do_anonymous_page(struct mm_s
 	if (!page)
 		goto oom;
 
-		if (mem_container_charge(page, mm))
-			goto oom_free_page;
+	if (mem_container_charge(page, mm))
+		goto oom_free_page;
 
 	entry = mk_pte(page, vma->vm_page_prot);
 	entry = maybe_mkwrite(pte_mkdirty(entry), vma);

_

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

author
#2 lore raw

Andrew Morton napsal(a):

Quoted 8 lines · On Thu, 13 Sep 2007 13:43:43 +0200 Jiri Slaby <[email protected]> wrote:
Quoted 7 lines

Hi,

I have this circular lock dependency on 2.6.23-rc4-mm1 when opening /dev/video0 and mmaping it. the v4l driver is stk11xx:
http://www.fi.muni.cz/~xslaby/sklad/panics/mm-deadlock.png

Quoted 7 lines
Quoted 5 lines

Using slub on x86_64 if that matters.

For now, I'm unable to set up a netconsole, so only the picture linked above is the best I have.

oop, I think you'll want this:

yes, thanks,

Signature · 8 lines
http://www.fi.muni.cz/~xslaby/            Jiri Slaby
faculty of informatics, masaryk university, brno, cz

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>