[Bug 270283] would like an even safer LIST_FOREACH_SAFE()
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 270283] would like an even safer LIST_FOREACH_SAFE()"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 17 Mar 2023 11:26:49 UTC
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.