Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 01 Jan 1997 06:22:49 -0800
From:      David Greenman <dg@root.com>
To:        phk@freebsd.org
Cc:        current@freebsd.org
Subject:   Re: <sys/queue.h> potential for panic 
Message-ID:  <199701011422.GAA10526@root.com>
In-Reply-To: Your message of "Wed, 01 Jan 1997 13:52:37 %2B0100." <12720.852123157@critter.dk.tfs.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
>
>TAILQ_REMOVE and STAILQ_REMOVE would panic with a zero dereference
>if you tried to remove something not on the queue.
>
>Wouldn't it make sense to avoid that, or would the overhead be considered
>prohibitive ?

   It would be a software error if multiple TAILQ_REMOVEs occurred (in just
the same way that multiple frees are a bug), so the condition must be caught.
I think a NULL dereference is not unreasonable (better than adding needless
extra cost checking).

-DG

David Greenman
Core-team/Principal Architect, The FreeBSD Project



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701011422.GAA10526>