HomeFreeBSD

Atomically update the global gMsgId in libnetgraph.

Description

Atomically update the global gMsgId in libnetgraph.

Otherwise concurrently running threads may inadvertently use the same
token for different messages.

Preserve the behaviour of disallowing negative message tokens, but allow
a message token value of zero since this simplifies the code a bit and
tokens are documented to be non-negative.

PR: 234442
Reported and tested by: eugen
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

Details

Provenance
markjAuthored on
Parents
rS347438: fusefs: return ENOTCONN instead of EIO if the daemon dies suddenly
Branches
Unknown
Tags
Unknown