linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PATCH 2.4.18-rc2-ac1: hang on spinlock in "expand_stack"
@ 2002-03-03  2:36 Kevin Buhr
  2002-03-03 13:47 ` Alan Cox
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Buhr @ 2002-03-03  2:36 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel

Alan:

I've enclosed a patch against 2.4.18-rc2-ac1, but it appears the same
bug still exists in 2.4.19-pre1-ac1.  The "ac"-branch version of
"expand_stack" in "mm/mmap.c" has a code path that doesn't unlock the
spinlock.  I noticed when a "gdb" bug tickled it and locked up my
machine.

Kevin Buhr <buhr@telus.net>

                        *       *       *

--- linux-2.4.18-rc2-ac1/mm/mmap.c	Tue Feb 19 19:13:57 2002
+++ linux-2.4.18-rc2-ac1-local/mm/mmap.c	Sat Mar  2 17:58:47 2002
@@ -762,8 +762,10 @@
 	grow = (vma->vm_start - address) >> PAGE_SHIFT;
 
 	/* Overcommit.. */
-	if(!vm_enough_memory(grow, 1))
+	if(!vm_enough_memory(grow, 1)) {
+		spin_unlock(&vma->vm_mm->page_table_lock);
 		return -ENOMEM;
+	}
 	
 	if (vma->vm_end - address > current->rlim[RLIMIT_STACK].rlim_cur ||
 	    ((vma->vm_mm->total_vm + grow) << PAGE_SHIFT) > current->rlim[RLIMIT_AS].rlim_cur) {

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH 2.4.18-rc2-ac1: hang on spinlock in "expand_stack"
  2002-03-03  2:36 PATCH 2.4.18-rc2-ac1: hang on spinlock in "expand_stack" Kevin Buhr
@ 2002-03-03 13:47 ` Alan Cox
  0 siblings, 0 replies; 3+ messages in thread
From: Alan Cox @ 2002-03-03 13:47 UTC (permalink / raw)
  To: Kevin Buhr; +Cc: Alan Cox, linux-kernel

> I've enclosed a patch against 2.4.18-rc2-ac1, but it appears the same
> bug still exists in 2.4.19-pre1-ac1.  The "ac"-branch version of
> "expand_stack" in "mm/mmap.c" has a code path that doesn't unlock the
> spinlock.  I noticed when a "gdb" bug tickled it and locked up my
> machine.

Thanks. Thats one I accidentally introduced when I was doing the strict
oom handling. I'll apply that

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH 2.4.18-rc2-ac1: hang on spinlock in "expand_stack"
@ 2002-03-03  4:03 Alex Davis
  0 siblings, 0 replies; 3+ messages in thread
From: Alex Davis @ 2002-03-03  4:03 UTC (permalink / raw)
  To: linux-kernel

This bug also exists in 2.4.19pre2-ac2

-Alex


__________________________________________________
Do You Yahoo!?
Yahoo! Sports - sign up for Fantasy Baseball
http://sports.yahoo.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-03-03 13:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-03  2:36 PATCH 2.4.18-rc2-ac1: hang on spinlock in "expand_stack" Kevin Buhr
2002-03-03 13:47 ` Alan Cox
2002-03-03  4:03 Alex Davis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).