Subject: Re: LIST_INIT missing from kern_subr hooks?
To: None <tech-kern@netbsd.org>
From: Martin Husemann <martin@duskware.de>
List: tech-kern
Date: 02/17/2005 10:53:45
On Thu, Feb 17, 2005 at 10:40:43AM +0100, Peter Bex wrote:
> While doing so, I noticed that the forkhook_list and exithook_list are not LIST_INITed in
> kern/kern_subr.c.  Am I misunderstanding things?  I thought LIST_INIT had te be called on lists
> before they could be used.

Yes, the formaly correct way would be to declare them as

  hook_list_t forkhook_list = LIST_HEAD_INITIALIZER(forkhook_list);

but if you look at queue.h you'll notize that this just initialize the
pointer with NULL - which happens anyway. So in this case it is not the reason
for the crashes that you see.

Martin