Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Jul 2019 08:39:53 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r349995 - head/sys/kern
Message-ID:  <201907150839.x6F8drnv095612@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Mon Jul 15 08:39:52 2019
New Revision: 349995
URL: https://svnweb.freebsd.org/changeset/base/349995

Log:
  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

Modified:
  head/sys/kern/kern_umtx.c

Modified: head/sys/kern/kern_umtx.c
==============================================================================
--- head/sys/kern/kern_umtx.c	Mon Jul 15 08:38:01 2019	(r349994)
+++ head/sys/kern/kern_umtx.c	Mon Jul 15 08:39:52 2019	(r349995)
@@ -1926,7 +1926,7 @@ do_lock_pi(struct thread *td, struct umutex *m, uint32
 				if (error == 0) {
 					error = umtxq_check_susp(td, true);
 					if (error != 0)
-						return (error);
+						break;
 				}
 
 				/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201907150839.x6F8drnv095612>