Re: Happy new year^H^H^H^Hkernel..

Kai Germaschewski
2001-01-03T22:06:18Z

On 3 Jan 2001, Eric W. Biederman wrote:

> Kai Germaschewski <kai@thphy.uni-duesseldorf.de> writes:
>
> > I think the problem was that we relied on divert_if being initialized to
> > zero automatically, which didn't happen because it was not declared static
> > and therefore not in .bss (*is this true?*).
>
> All variables with static storage (not with static scope) if not explicitly
> initialized are placed in the bss segment. In particular this
> means that adding/removing a static changes nothing.

The patch is right, the explanation was wrong. Sorry, I didn't CC l-k when
I found what was really going on. Other source files used a global
initialized variable "divert_if" as well, so this became the same one as
the one referenced in isdn_common.c. That's why it wasn't zero, it was
explicitly initialized elsewhere. However, making divert_if static in
isdn_common.c fixes the problem, because now it's really local to this
file and therefore initialized to NULL.

--Kai