* Re: [FBCON] Could be called outside of a process context. This fixes that.
[not found] <200304141829.h3EITgZF028370@hera.kernel.org>
@ 2003-04-15 1:53 ` Andrew Morton
2003-04-15 2:12 ` Dave Jones
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Morton @ 2003-04-15 1:53 UTC (permalink / raw)
To: Linux Kernel Mailing List; +Cc: James Simmons
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [FBCON] Could be called outside of a process context. This fixes that.
2003-04-15 1:53 ` [FBCON] Could be called outside of a process context. This fixes that Andrew Morton
@ 2003-04-15 2:12 ` Dave Jones
0 siblings, 0 replies; 2+ messages in thread
From: Dave Jones @ 2003-04-15 2:12 UTC (permalink / raw)
To: Andrew Morton; +Cc: Linux Kernel Mailing List, James Simmons
On Mon, Apr 14, 2003 at 06:53:26PM -0700, Andrew Morton 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.
> >
>
> 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.
James fixed this up in 1.982, when he changed things over to use workqueues.
Dave
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-04-15 2:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <200304141829.h3EITgZF028370@hera.kernel.org>
2003-04-15 1:53 ` [FBCON] Could be called outside of a process context. This fixes that Andrew Morton
2003-04-15 2:12 ` Dave Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox