From patchwork Thu Sep 6 06:40:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jeffery X-Patchwork-Id: 966814 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 425WFC266lz9sDb for ; Thu, 6 Sep 2018 16:41:35 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=aj.id.au Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=aj.id.au header.i=@aj.id.au header.b="SX41SDSa"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="g2HrCtLc"; dkim-atps=neutral Received: from lists.ozlabs.org (unknown [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 425WFC09HGzF3HL for ; Thu, 6 Sep 2018 16:41:35 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=aj.id.au Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=aj.id.au header.i=@aj.id.au header.b="SX41SDSa"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="g2HrCtLc"; dkim-atps=neutral X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=aj.id.au (client-ip=64.147.123.25; helo=wout2-smtp.messagingengine.com; envelope-from=andrew@aj.id.au; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=aj.id.au Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=aj.id.au header.i=@aj.id.au header.b="SX41SDSa"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="g2HrCtLc"; dkim-atps=neutral Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 425WDF2P67zF39g for ; Thu, 6 Sep 2018 16:40:45 +1000 (AEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id C66EE490; Thu, 6 Sep 2018 02:40:42 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 06 Sep 2018 02:40:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h=cc :date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=6yWp0B8/dO9mhIozF kH9i0ET8fuWD9c5fSWljFaxcY0=; b=SX41SDSa3rF12kJpGtQn/gcSdJB2PVmUP ZhxAnQCj18dBt/A/jkvbThTtXVwq/ETIE7rZ+5bFO3nWXQgYhX22zgnym0ulUu9f cFnsUpXzPlPI8P8nbBiOaxe8mmrrDr/6bvVsxy2ReDtGcsXuRBgHiAn2H2rr6dpP X2frr/sz+w9k9RODxR2/a7IuAMQr8El/Zkkz7LcKl3zC/ZI46vkY7Q80bPXKl44C dgaDY+BGS0sE88dBvI/lX/XMKBJrbIPW6A+veRW/y7p3KGjYUttuXOt83fvJ6uFS PxuKffrWmjo6NlyZe4oQNUSbyk0d8ANxubMFen7Yc8YKxeZ4IHI/A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=6yWp0B8/dO9mhIozFkH9i0ET8fuWD9c5fSWljFaxcY0=; b=g2HrCtLc idFHWxmqWK2yx59+oHgaG/vanPZmh/BmJOeH5HRnyyhQI+j0dX1m/241nEwXqM06 hm4I5C5/85Ld4uT8+Rp0uU6tctEc8i+6XRwK62pwCXJ7FcdEYO25E6QwRmxaHXVE Evh85QaOAoM4e7XWc2uMdV/wt0DrPa6UYH47KLvCstBpoGu2d+rJNSHU3tNuz9/f mRH3FoTR6sGAvqbt9wfTKJKAHgwG0r6XhnT5NtG7RbK0NXev/fmz+7aIcUuzu+kL DbqxW/4jM6SX+Cgr4SIXvohX2B9kPnp6QtkAkIIhGyOOjCkkaxOfBs8YsLdvyags vTGmQbnYWLGOFw== X-ME-Proxy: X-ME-Sender: Received: from localhost.localdomain (ppp118-210-231-68.bras1.adl4.internode.on.net [118.210.231.68]) by mail.messagingengine.com (Postfix) with ESMTPA id 4FCF9E4015; Thu, 6 Sep 2018 02:40:39 -0400 (EDT) From: Andrew Jeffery To: skiboot@lists.ozlabs.org Date: Thu, 6 Sep 2018 16:10:11 +0930 Message-Id: <20180906064015.1498-3-andrew@aj.id.au> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180906064015.1498-1-andrew@aj.id.au> References: <20180906064015.1498-1-andrew@aj.id.au> Subject: [Skiboot] [RFC PATCH 2/6] core/lock: Use try_lock_caller() in lock_caller() to capture owner X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dkodihal@in.ibm.com, Andrew Jeffery , anoo@linux.ibm.com MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Otherwise we can get reports of core/lock.c owning the lock, which is not helpful when tracking down ownership issues. Signed-off-by: Andrew Jeffery --- core/lock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/lock.c b/core/lock.c index fca8f465f262..a26d6621bbd0 100644 --- a/core/lock.c +++ b/core/lock.c @@ -230,7 +230,7 @@ void lock_caller(struct lock *l, const char *owner) lock_check(l); - if (try_lock(l)) + if (try_lock_caller(l, owner)) return; add_lock_request(l);