We need to unlock the struct on all the return paths. We didn't on this one.
Signed-off-by: Warner Losh <[email protected]> --- bsd-user/freebsd/os-thread.c | 1 + 1 file changed, 1 insertion(+) diff --git a/bsd-user/freebsd/os-thread.c b/bsd-user/freebsd/os-thread.c index a36c5ceccf..86dea0aea2 100644 --- a/bsd-user/freebsd/os-thread.c +++ b/bsd-user/freebsd/os-thread.c @@ -1350,6 +1350,7 @@ abi_long freebsd_rw_wrlock(abi_ulong target_addr, long fflag, size_t tsz, tswap32(state)); ret = get_errno(safe__umtx_op(&target_urwlock->rw_state, UMTX_OP_WAKE, INT_MAX, NULL, NULL)); + unlock_user_struct(target_urwlock, target_addr, ret == 0); return ret; } /* re-read the state */ -- 2.52.0
