>>>>> "jun" == Jun Sun <jsun@mvista.com> writes: jun> Geert Uytterhoeven wrote: >> >> On Tue, 17 Apr 2001, Scott A McConnell wrote: >> > 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){ >> >> 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. >> 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