linux futex_put(): do not touch futex after dropping our reference.

Reported and tested by:	Steve Roome <me@stephenroome.com>
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
This commit is contained in:
Konstantin Belousov 2020-02-07 22:21:44 +00:00
parent c81929d343
commit 8e3d7caee5

View file

@ -329,9 +329,9 @@ futex_put(struct futex *f, struct waiting_proc *wp)
f->f_key.shared);
LINUX_CTR3(sys_futex, "futex_put uaddr %p ref %d shared %d",
f->f_uaddr, f->f_refcount, f->f_key.shared);
FUTEXES_UNLOCK;
if (FUTEX_LOCKED(f))
futex_unlock(f);
FUTEXES_UNLOCK;
LIN_SDT_PROBE0(futex, futex_put, return);
}