diff options
| author | Zhenlei Huang <zlei@FreeBSD.org> | 2026-03-30 16:00:01 +0000 |
|---|---|---|
| committer | Zhenlei Huang <zlei@FreeBSD.org> | 2026-03-30 16:00:01 +0000 |
| commit | ee9456ce37539da5b651945eea18502f290eb133 (patch) | |
| tree | deb2ccd1a5cd8a99c1f832d2faf64e51e5d7bfe7 /contrib/libfido2/regress | |
| parent | 0f147784de1037a662b0bd0aaa5f7f7bd7876e37 (diff) | |
The thread running if_vmove_reclaim() may race with other threads those
running if_detach(), if_vmove_loan() or if_vmove_reclaim(). In case the
current thread loses race, two issues arise,
1. It is unstable and unsafe to access ifp->if_vnet,
2. The interface is removed from "active" list, hence if_unlink_ifnet()
can fail.
For the first case, check against source prison's vnet instead, given
the interface is obtained from that vnet.
For the second one, return ENODEV to indicate the interface was on the
list but the current thread loses race, to distinguish from ENXIO, which
means the interface or child prison is not found. This is the same with
if_vmove_loan().
Reviewed by: kp, pouria
Fixes: a779388f8bb3 if: Protect V_ifnet in vnet_if_return()
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D55997
Diffstat (limited to 'contrib/libfido2/regress')
0 files changed, 0 insertions, 0 deletions
