From: "Antonino A. Daplas" <adaplas@hotpop.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Jakub Bogusz <qboosh@pld-linux.org>,
Linux Kernel Development <linux-kernel@vger.kernel.org>,
Linux Frame Buffer Device Development
<linux-fbdev-devel@lists.sourceforge.net>,
pld-kernel@pld-linux.org
Subject: Re: 2.6.7 fbcon: set_con2fb on current console = crash
Date: Sat, 19 Jun 2004 18:03:10 +0800 [thread overview]
Message-ID: <200406191803.10736.adaplas@hotpop.com> (raw)
In-Reply-To: <Pine.GSO.4.58.0406191127250.23356@waterleaf.sonytel.be>
On Saturday 19 June 2004 17:28, Geert Uytterhoeven wrote:
> On Sat, 19 Jun 2004, Antonino A. Daplas wrote:
> > Thanks. Actually there's still a critical flaw in the set_con2fbmap
> > code. For one, con2fb_map is never initialized. It's just fortunate that
> > this array happens to be filled with zeroes so con2fb_map[n] will always
> > return zero and registered_fb[0] happens to contain a valid info. So it
> > works, by accident.
>
> According to the C standard, global variables are initialized to zero,
> unless specified otherwise.
>
I know, but what I meant was con2fb_map[] is never initialized by fbcon. So
if the first valid fbdev is in registered_fb[1], then con2fbmap must be
initialized to 1's by fbcon. It doesn't. Note, fbdev-2.4 does the
initialization correctly.
So 2 critical flaws in the code:
1. con2fb_map[] is always zero-set
2. fbcon assumes that registered_fb[0] is always valid
Both flaws will manifest by doing this:
modprobe fbdev1 - in registered_fb[0]
modprobe fbdev2 - in registered_fb[1]
rmmod fbdev1 - registered_fb[0] becomes invalid
modprobe fbcon
- con2fb_map[] with zeroes instead of 1's and fbcon_startup looks for
fb_info in registered_fb[0] instead of registered_fb[1]
Tony
-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
prev parent reply other threads:[~2004-06-19 10:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-18 21:50 2.6.7 fbcon: set_con2fb on current console = crash Jakub Bogusz
2004-06-19 6:13 ` Antonino A. Daplas
2004-06-19 9:28 ` Geert Uytterhoeven
2004-06-19 10:03 ` Antonino A. Daplas [this message]
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=200406191803.10736.adaplas@hotpop.com \
--to=adaplas@hotpop.com \
--cc=adaplas@pol.net \
--cc=geert@linux-m68k.org \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=pld-kernel@pld-linux.org \
--cc=qboosh@pld-linux.org \
/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).