Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Mar 2023 11:26:49 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 270283] would like an even safer LIST_FOREACH_SAFE()
Message-ID:  <bug-270283-227-xsVH0hW5vD@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-270283-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | previous in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270283

Konstantin Belousov <kib@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kib@FreeBSD.org

--- Comment #1 from Konstantin Belousov <kib@FreeBSD.org> ---
In such situation, where you have a possibility of uncontrolled removal of the
list elements, usual approach is to put a marker element on the list. The
marker should be not subject for removal by any regular operations.

See e.g. MNT_VNODE_FOREACH* and vm_pageout.c (search for marker).

-- 
You are receiving this mail because:
You are the assignee for the bug.

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-270283-227-xsVH0hW5vD>