From: viro@parcelfarce.linux.theplanet.co.uk
To: Matthew Wilcox <willy@debian.org>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vmalloc might sleep
Date: Sun, 31 Aug 2003 04:20:07 +0100 [thread overview]
Message-ID: <20030831032007.GZ454@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <20030831030643.GQ13467@parcelfarce.linux.theplanet.co.uk>
On Sun, Aug 31, 2003 at 04:06:43AM +0100, Matthew Wilcox wrote:
>
> So let's whack people upside the head when they misuse it.
>
> vmalloc-might-sleep.diff:
>
> Index: mm/vmalloc.c
> ===================================================================
> RCS file: /var/cvs/linux-2.6/mm/vmalloc.c,v
> retrieving revision 1.2
> diff -u -p -r1.2 vmalloc.c
> --- a/mm/vmalloc.c 23 Aug 2003 02:47:26 -0000 1.2
> +++ b/mm/vmalloc.c 31 Aug 2003 03:04:25 -0000
> @@ -438,7 +438,8 @@ fail:
> */
> void *vmalloc(unsigned long size)
> {
> - return __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL);
> + might_sleep();
> + return __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL);
__vmalloc() goes kmalloc() to get an array of struct page pointers. And
both for vmalloc() and vmalloc_32() kmalloc() will be called with GFP_KERNEL
as gfp_mask. Which already has might_sleep().
prev parent reply other threads:[~2003-08-31 3:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-31 3:06 Matthew Wilcox
2003-08-31 3:20 ` viro [this message]
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=20030831032007.GZ454@parcelfarce.linux.theplanet.co.uk \
--to=viro@parcelfarce.linux.theplanet.co.uk \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=willy@debian.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
Powered by JetHome