From owner-svn-src-all@FreeBSD.ORG Fri Aug 22 18:42:15 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F6483C7; Fri, 22 Aug 2014 18:42:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6BB8935DD; Fri, 22 Aug 2014 18:42:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7MIgFDC094338; Fri, 22 Aug 2014 18:42:15 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7MIgFNO094337; Fri, 22 Aug 2014 18:42:15 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201408221842.s7MIgFNO094337@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 22 Aug 2014 18:42:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270345 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2014 18:42:15 -0000 Author: kib Date: Fri Aug 22 18:42:14 2014 New Revision: 270345 URL: http://svnweb.freebsd.org/changeset/base/270345 Log: In do_lock_pi(), do not override error from umtxq_sleep_pi() when doing suspend check. This restores the pre-r251684 behaviour, to retry once after the signal is detected. PR: kern/192918 Submitted by: Elliott Rabe, Dell Inc., Eric van Gyzen Obtained from: Dell Inc. MFC after: 1 week Modified: head/sys/kern/kern_umtx.c Modified: head/sys/kern/kern_umtx.c ============================================================================== --- head/sys/kern/kern_umtx.c Fri Aug 22 18:09:06 2014 (r270344) +++ head/sys/kern/kern_umtx.c Fri Aug 22 18:42:14 2014 (r270345) @@ -1700,10 +1700,12 @@ do_lock_pi(struct thread *td, struct umu * and we need to retry or we lost a race to the thread * unlocking the umtx. */ - if (old == owner) + if (old == owner) { error = umtxq_sleep_pi(uq, pi, owner & ~UMUTEX_CONTESTED, "umtxpi", timeout == NULL ? NULL : &timo); - else { + if (error != 0) + continue; + } else { umtxq_unbusy(&uq->uq_key); umtxq_unlock(&uq->uq_key); }