public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Antonino A. Daplas" <adaplas@pol.net>
To: Andrew Morton <akpm@osdl.org>
Cc: Tilman Schmidt <tilman@imap.cc>, linux-kernel@vger.kernel.org
Subject: Re: i810 framebuffer - BUG: sleeping function called from invalid context
Date: Fri, 17 Mar 2006 22:51:01 +0800	[thread overview]
Message-ID: <441ACCD5.6070404@pol.net> (raw)
In-Reply-To: <20060317031410.2479d8e1.akpm@osdl.org>

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@pol.net>

---
Andrew Morton wrote:
> Tilman Schmidt <tilman@imap.cc> 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;

  reply	other threads:[~2006-03-17 14:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-15 19:38 i810 framebuffer - BUG: sleeping function called from invalid context Tilman Schmidt
2006-03-17 11:14 ` Andrew Morton
2006-03-17 14:51   ` Antonino A. Daplas [this message]
2006-03-18 11:31     ` Tilman Schmidt
2006-03-24 15:08       ` Adrian Bunk
2006-03-24 19:00         ` Andrew Morton

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=441ACCD5.6070404@pol.net \
    --to=adaplas@pol.net \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tilman@imap.cc \
    /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