Subject: kernel/printk.c problem

From: Scott A McConnell <[email-masked]>
Date: Tue, 17 Apr 2001 15:11:58 -0700

struct console *console_drivers = NULL;                          <----
Need the NULL.

Otherwise, bad things can happen on the following statement in printk

~line 311

       if ((c->flags & CON_ENABLED) && c->write){

Scott

---

From: Geert Uytterhoeven <[email-masked]>
Date: Wed, 18 Apr 2001 08:53:49 +0200 (MET DST)

>        if ((c->flags & CON_ENABLED) && c->write){

Current policy is not explicitly initializing variables to zero. If this causes
problems, there's a bug in the routine that clears the BSS on kernel entry.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven ------------- Sony Software Development Center Europe (SDCE)
[email-masked] ------------------- Sint-Stevens-Woluwestraat 55
Voice +32-2-7248626 Fax +32-2-7262686 ---------------- B-1130 Brussels, Belgium

---

From: Scott A McConnell <[email-masked]>
Date: Wed, 18 Apr 2001 09:56:40 -0700

> problems, there's a bug in the routine that clears the BSS on kernel entry.

What a man! You can debug my code from 6000 + miles away without even seeing it
;-)

---

From: Jun Sun <[email-masked]>
Date: Wed, 18 Apr 2001 10:32:27 -0700

> problems, there's a bug in the routine that clears the BSS on kernel entry.

Interesting.  What is the reason behind the policy?  Is that because
initialized variable are put in a different section that takes more size in
the image?

Jun

---

From: Juan Quintela <[email-masked]>
Date: 18 Apr 2001 20:28:42 +0200

>>>>> "jun" == Jun Sun <[email-masked]> writes:

>> problems, there's a bug in the routine that clears the BSS on kernel entry.

jun> Interesting.  What is the reason behind the policy?  Is that because
jun> initialized variable are put in a different section that takes more size in
jun> the image?

Yes.  In linux the BSS section (aka non explicitely initialized vars)
is initializated with 0.  The initialzed variables need to be in the
data section of the kernel image (what only adds size, nothing else).

Later, Juan.

-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy