From 74a796e0fc2b37600a9a6f6bdc0366103e44231b Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Mon, 17 Aug 2020 21:30:15 +0000 Subject: [PATCH] Fix a lock leak when emulating futex(FUTEX_WAIT_BITSET). Reported by: syzkaller MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sys/compat/linux/linux_futex.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linux/linux_futex.c b/sys/compat/linux/linux_futex.c index 847adcbbec7..b0fcfdfd297 100644 --- a/sys/compat/linux/linux_futex.c +++ b/sys/compat/linux/linux_futex.c @@ -643,6 +643,7 @@ futex_wait(struct futex *f, struct waiting_proc *wp, struct timespec *ts, if (bitset == 0) { LIN_SDT_PROBE1(futex, futex_wait, return, EINVAL); + futex_put(f, wp); return (EINVAL); }