mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kevin Buhr <buhr@telus.net>
To: alan@lxorguk.ukuu.org.uk (Alan Cox)
Cc: linux-kernel@vger.kernel.org
Subject: PATCH 2.4.18-rc2-ac1: hang on spinlock in "expand_stack"
Date: 02 Mar 2002 18:36:12 -0800	[thread overview]
Message-ID: <87d6ymfkdf.fsf@saurus.asaurus.invalid> (raw)

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) {

             reply	other threads:[~2002-03-03  2:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-03  2:36 Kevin Buhr [this message]
2002-03-03 13:47 ` Alan Cox
2002-03-03  4:03 Alex Davis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d6ymfkdf.fsf@saurus.asaurus.invalid \
    --to=buhr@telus.net \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®