From owner-svn-src-all@freebsd.org Thu Jan 28 12:00:18 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94929A706D7; Thu, 28 Jan 2016 12:00:18 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 669AA18B6; Thu, 28 Jan 2016 12:00:18 +0000 (UTC) (envelope-from wma@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0SC0Hij054522; Thu, 28 Jan 2016 12:00:17 GMT (envelope-from wma@FreeBSD.org) Received: (from wma@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0SC0HLw054521; Thu, 28 Jan 2016 12:00:17 GMT (envelope-from wma@FreeBSD.org) Message-Id: <201601281200.u0SC0HLw054521@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wma set sender to wma@FreeBSD.org using -f From: Wojciech Macek Date: Thu, 28 Jan 2016 12:00:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r294979 - head/sys/arm64/arm64 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.20 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: Thu, 28 Jan 2016 12:00:18 -0000 Author: wma Date: Thu Jan 28 12:00:17 2016 New Revision: 294979 URL: https://svnweb.freebsd.org/changeset/base/294979 Log: Fix mutex releasing in ARM64 cpu_switch The code should be comparing pointers, not any data gathered from a blocked_lock. Spotted by: cognet Approved by: zbb, cognet (mentor) Differential revision: https://reviews.freebsd.org/D5100 Modified: head/sys/arm64/arm64/swtch.S Modified: head/sys/arm64/arm64/swtch.S ============================================================================== --- head/sys/arm64/arm64/swtch.S Thu Jan 28 09:25:15 2016 (r294978) +++ head/sys/arm64/arm64/swtch.S Thu Jan 28 12:00:17 2016 (r294979) @@ -166,9 +166,8 @@ ENTRY(cpu_switch) */ str x2, [x0, #TD_LOCK] #if defined(SCHED_ULE) && defined(SMP) - /* Read the value in blocked_lock */ - ldr x0, =_C_LABEL(blocked_lock) - ldr x2, [x0] + /* Spin if TD_LOCK points to a blocked_lock */ + ldr x2, =_C_LABEL(blocked_lock) 1: ldar x3, [x1, #TD_LOCK] cmp x3, x2