mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@digeo.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: James Simmons <jsimmons@infradead.org>
Subject: Re: [FBCON] Could be called outside of a process context. This fixes that.
Date: Mon, 14 Apr 2003 18:53:26 -0700	[thread overview]
Message-ID: <20030414185326.1fdf2e01.akpm@digeo.com> (raw)
In-Reply-To: <200304141829.h3EITgZF028370@hera.kernel.org>

Linux Kernel Mailing List <linux-kernel@vger.kernel.org> wrote:
>
> ChangeSet 1.981, 2003/03/25 10:21:46-08:00, jsimmons@maxwell.earthlink.net
> 
> 	[FBCON] Could be called outside of a process context. This fixes that.
> 
> 
> ...
> diff -Nru a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
> --- a/drivers/video/console/fbcon.c	Mon Apr 14 11:29:45 2003
> +++ b/drivers/video/console/fbcon.c	Mon Apr 14 11:29:45 2003
> @@ -985,8 +985,8 @@
>  
>  	size = ((width + 7) >> 3) * height;
>  
> -	data = kmalloc(size, GFP_KERNEL);
> -	mask = kmalloc(size, GFP_KERNEL);
> +	data = kmalloc(size, GFP_ATOMIC);
> +	mask = kmalloc(size, GFP_ATOMIC);
>  	
>  	if (cursor->set & FB_CUR_SETSIZE) {
>  		memset(data, 0xff, size);

GFP_ATOMIC memory allocations can and will return NULL when the system is
under load.  The driver _has_ to check for this, and cope with it.

       reply	other threads:[~2003-04-15  1:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200304141829.h3EITgZF028370@hera.kernel.org>
2003-04-15  1:53 ` Andrew Morton [this message]
2003-04-15  2:12   ` Dave Jones

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=20030414185326.1fdf2e01.akpm@digeo.com \
    --to=akpm@digeo.com \
    --cc=jsimmons@infradead.org \
    --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®