mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matthew Jacob <mjacob@feral.com>
To: linux-kernel@vger.kernel.org
Subject: [patch] 2.4 fix to allow vmalloc at interrupt time
Date: Tue, 13 May 2003 14:11:12 -0700 (PDT)	[thread overview]
Message-ID: <20030513140629.I83125@mailhost.quaver.net> (raw)
In-Reply-To: <20030512225654.GA27358@cm.nu>


This fixes a buglet wrt doing vmalloc at interrupt time for 2.4.

get_vm_area should call kmalloc with GFP_ATOMIC- after all, it's
set up to allow for an allocation failure. As best as I read
the 2.4 code, the rest of the path through _kmem_cache_alloc
should be safe.

===== vmalloc.c 1.15 vs edited =====
--- 1.15/mm/vmalloc.c	Wed Feb 12 05:30:56 2003
+++ edited/vmalloc.c	Fri May  9 23:42:09 2003
@@ -173,7 +173,7 @@
 	unsigned long addr, next;
 	struct vm_struct **p, *tmp, *area;

-	area = (struct vm_struct *) kmalloc(sizeof(*area), GFP_KERNEL);
+	area = (struct vm_struct *) kmalloc(sizeof(*area), GFP_ATOMIC);
 	if (!area)
 		return NULL;


  reply	other threads:[~2003-05-13 20:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-12 22:56 [patch] 2.4 ac97_codec micboost control Shane Wegner
2003-05-13 21:11 ` Matthew Jacob [this message]
2003-05-13 21:17   ` [patch] 2.4 fix to allow vmalloc at interrupt time William Lee Irwin III
2003-05-13 21:28     ` Matthew Jacob
2003-05-13 22:40     ` Russell King
2003-05-13 21:18   ` Christoph Hellwig
2003-05-13 22:34   ` Alan Cox
2003-05-13 23:21     ` Alan Cox

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=20030513140629.I83125@mailhost.quaver.net \
    --to=mjacob@feral.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjacob@quaver.net \
    /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®