Skip to contentSkip to conversation

Could be called outside of a process context. This fixes that.

FBCON Andrew Morton 2 participants 2 messages Apr 15, 2003 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 11 lines · Linux Kernel Mailing List

ChangeSet 1.981, 2003/03/25 10:21:46-08:00, [email protected]

[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

drivers/video/console/fbcon.c line 992

Quoted 10 lines
drivers/video/console/fbcon.c +2 -2
@@ -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.

#2 lore raw
Quoted 6 lines · Andrew Morton
Quoted 3 lines

ChangeSet 1.981, 2003/03/25 10:21:46-08:00, [email protected]
[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