aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2019-07-15 08:39:52 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2019-07-15 08:39:52 +0000
commitad038195bd69aaf35c4bde17e73a847ad47ccbf9 (patch)
treef2504cd841529c52cbd7d1a251d94533c7834564
parent40bd868ba7fd8e941cb0e4ea599489ef459d6095 (diff)
downloadsrc-ad038195bd69aaf35c4bde17e73a847ad47ccbf9.tar.gz
src-ad038195bd69aaf35c4bde17e73a847ad47ccbf9.zip
In do_lock_pi(), do not return prematurely.
If umtxq_check_susp() indicates an exit, we should clean the resources before returning. Do it by breaking out of the loop and relying on post-loop cleanup. Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 12 days Differential revision: https://reviews.freebsd.org/D20949
Notes
Notes: svn path=/head/; revision=349995
-rw-r--r--sys/kern/kern_umtx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c
index a5a7c46b71bd..840344fd61df 100644
--- a/sys/kern/kern_umtx.c
+++ b/sys/kern/kern_umtx.c
@@ -1926,7 +1926,7 @@ do_lock_pi(struct thread *td, struct umutex *m, uint32_t flags,
if (error == 0) {
error = umtxq_check_susp(td, true);
if (error != 0)
- return (error);
+ break;
}
/*