Re: i810 framebuffer - BUG: sleeping function called from invalidcontext

From: Antonino A. Daplas
Date: Fri Mar 17 2006 - 09:48:35 EST


The console cursor can be called in atomic context. Change memory
allocation to use the GFP_ATOMIC flag in i810fb_cursor().

Signed-off-by: Antonino Daplas <adaplas@xxxxxxx>

---
Andrew Morton wrote:
> Tilman Schmidt <tilman@xxxxxxx> wrote:
>> Thought I'd finally report this, seeing it still around with 2.6.16-rc6-mm1.
>>
>> With every 2.6.16-rc-mm version I can remember (sorry, no precise records)
>> my development machine (a Dell OptiPlex GX110, Intel P3/933, Intel chipset)
>> has been producing the following three BUG messages while booting:
>>
>> <6>[ 36.528181] md: Autodetecting RAID arrays.
>> <3>[ 36.528263] BUG: sleeping function called from invalid context at mm/slab.c:2758
>> <4>[ 36.528270] in_atomic():1, irqs_disabled():

This one, most probably.

Tony

i810_main.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)


diff --git a/drivers/video/i810/i810_main.c b/drivers/video/i810/i810_main.c
index d8467c0..788297e 100644
--- a/drivers/video/i810/i810_main.c
+++ b/drivers/video/i810/i810_main.c
@@ -1508,7 +1508,7 @@ static int i810fb_cursor(struct fb_info
int size = ((cursor->image.width + 7) >> 3) *
cursor->image.height;
int i;
- u8 *data = kmalloc(64 * 8, GFP_KERNEL);
+ u8 *data = kmalloc(64 * 8, GFP_ATOMIC);

if (data == NULL)
return -ENOMEM;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/