From: "Paweł Sikora" <pluto@pld-linux.org>
To: linux-fbdev-devel@lists.sourceforge.net
Subject: Re: [linux-2.6.10] radeonfb / oops
Date: Sat, 12 Feb 2005 21:59:09 +0100 [thread overview]
Message-ID: <200502122159.10425.pluto@pld-linux.org> (raw)
In-Reply-To: <20050212173459.GA8195@dreamland.darkstar.lan>
On Saturday 12 of February 2005 18:34, Kronos wrote:
> It looks like this (in fbsplash_init):
>
> vc->vc_splash.theme = kmalloc((strlen(fbsplash_theme)+1) *
> sizeof(char), GFP_KERNEL); strcpy(vc->vc_splash.theme, fbsplash_theme);
>
> IMHO kmalloc failed and strcpy used the NULL pointer. Try to change the
> code in this way:
>
> vc->vc_splash.theme = kmalloc((strlen(fbsplash_theme)+1), GFP_KERNEL);
> if (!vc->vc_splash.theme) {
> misc_deregister(&splash_dev);
> printk(KERN_ERR "fbsplash_init: ZOMG!!! Out of mem!\n");
> return -ENOMEM;
> }
> strcpy(vc->vc_splash.theme, fbsplash_theme);
>
You're right.
(...)
pldworkstation Console: switching to colour frame buffer device 80x30
pldworkstation fbsplash_init: ZOMG!!! Out of mem!
(...)
btw).
Bellows fix (from Spock) should help for kmalloc.
I'll test it tomorrow...
--- a/drivers/video/fbsplash.c.orig 2005-02-12 21:14:47.000000000 +0100
+++ b/drivers/video/fbsplash.c 2005-02-12 21:15:34.272313976 +0100
@@ -59,7 +59,7 @@
int fbsplash_mode = 0;
char fbsplash_path[KMOD_PATH_LEN] = "/sbin/splash_helper";
-static char fbsplash_theme[FB_SPLASH_THEME_LEN] __initdata = "default";
+static char fbsplash_theme[FB_SPLASH_THEME_LEN] = "default";
int fbsplash_call_helper(char* cmd, unsigned short vc)
{
--
/* Copyright (C) 2003, SCO, Inc. This is valuable Intellectual Property. */
#define say(x) lie(x)
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
next prev parent reply other threads:[~2005-02-12 20:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-12 15:39 Re: [linux-2.6.10] radeonfb / oops Paweł Sikora
2005-02-12 17:34 ` Kronos
2005-02-12 20:59 ` Paweł Sikora [this message]
2005-02-13 9:53 ` Paweł Sikora
-- strict thread matches above, loose matches on Subject: below --
2005-02-03 8:25 Paweł Sikora
2005-02-01 16:36 Paweł Sikora
2005-02-01 20:54 ` James Simmons
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=200502122159.10425.pluto@pld-linux.org \
--to=pluto@pld-linux.org \
--cc=linux-fbdev-devel@lists.sourceforge.net \
/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;
as well as URLs for NNTP newsgroup(s).