lagg: remove use of net epoch in the ioctl paths
authorGleb Smirnoff <glebius@FreeBSD.org>
Mon, 6 May 2024 22:25:53 +0000 (15:25 -0700)
committerGleb Smirnoff <glebius@FreeBSD.org>
Mon, 6 May 2024 22:27:32 +0000 (15:27 -0700)
commitfadbb6f85a2ea6d804c12848e3fcfdb6f62fc039
tree1ee6e836ebabbe7b9d07fba180ceb7196094bb45
parent570685971c6ad30c75103453a38fdb2dff432bef
lagg: remove use of net epoch in the ioctl paths

Rely on LAGG_SLOCK() instead.  The use of network epoch(9) here was added
in 6573d7580b851 (later tidied by 87bf9b9cbeebc) as a large sweep that
blindly substituted blocking kernel primitives with epoch(9).  In these
particular code paths use of epoch(9) is incorrect and doesn't provide any
protection against a stale pointer.  Recent fix 48698ead6ff0, which should
actually have removed the epoch use, created a potential sleeping in epoch
problem.
sys/net/if_lagg.c