lkml.org 
[lkml]   [2002]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectPATCH 2.4.18-rc2-ac1: hang on spinlock in "expand_stack"
From
Date
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) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:24    [W:0.026 / U:2.304 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site