From nobody@FreeBSD.org  Thu Jan 19 13:50:14 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id F158516A420
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 19 Jan 2006 13:50:14 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id AD50943D46
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 19 Jan 2006 13:50:14 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k0JDoE3H031062
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 19 Jan 2006 13:50:14 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k0JDoEi0031059;
	Thu, 19 Jan 2006 13:50:14 GMT
	(envelope-from nobody)
Message-Id: <200601191350.k0JDoEi0031059@www.freebsd.org>
Date: Thu, 19 Jan 2006 13:50:14 GMT
From: Ray Lai <ray@cyth.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: SLIST_FOREACH_PREVPTR() macro is wrong
X-Send-Pr-Version: www-2.3

>Number:         91996
>Category:       kern
>Synopsis:       [headers] SLIST_FOREACH_PREVPTR() macro is wrong
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 19 14:00:11 GMT 2006
>Closed-Date:    Fri Feb 03 07:01:26 GMT 2006
>Last-Modified:  Fri Feb 03 07:01:26 GMT 2006
>Originator:     Ray Lai
>Release:        HEAD
>Organization:
>Environment:
>Description:
The SLIST_FOREACH_PREVPTR() macro in sys/queue.h is implemented incorrectly.  See https://marc.theaimsgroup.com/?l=openbsd-tech&m=113687205623649
>How-To-Repeat:
See https://marc.theaimsgroup.com/?l=openbsd-tech&m=113687205623649
>Fix:
https://marc.theaimsgroup.com/?l=openbsd-tech&m=113687205623649
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: ache 
State-Changed-When: Fri Feb 3 06:56:54 UTC 2006 
State-Changed-Why:  
You misunderstand what SLIST_FOREACH_PREVPTR() macro does. 

It is not for returning pointer to previous element, but for returning pointers 
to head->first or prev->next fields (to remove current element from the list) 


http://www.freebsd.org/cgi/query-pr.cgi?pr=91996 
>Unformatted:
