]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ip_mroute: do not call epoch_waitwhen lock is taken
authorWojciech Macek <wma@FreeBSD.org>
Tue, 11 Jan 2022 10:08:35 +0000 (11:08 +0100)
committerWojciech Macek <wma@FreeBSD.org>
Tue, 11 Jan 2022 10:19:32 +0000 (11:19 +0100)
commit2e72208b6c622505323ed48dc58830fc307392b1
treed5ccf9bc6426c9ddb4a730f49658885b66d75839
parent68f28dd1ccc33b870bb8c0509694df4ed5e05ee7
ip_mroute: do not call epoch_waitwhen lock is taken

mrouter_done is called with RAW IP lock taken. Some annoying
printfs are visible on the console if INVARIANTS option is enabled.

Provide atomic-based mechanism which counts enters and exits from/to
critical section in ip_input and ip_output.
Before de-initialization of function pointers ensure (with busy-wait)
that mrouter de-initialization is visible to all readers and that we don't
remove pointers (like ip_mforward etc.) in the middle of packet processing.
sys/netinet/ip_mroute.h
sys/netinet/raw_ip.c