lkml.org 
[lkml]   [2003]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [FBCON] Could be called outside of a process context. This fixes that.
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.
-
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:34    [W:0.794 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site