From patchwork Tue Oct 9 07:32:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jeffery X-Patchwork-Id: 981070 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 42Tpr52w8Mz9s9G for ; Tue, 9 Oct 2018 18:33:41 +1100 (AEDT) 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="YL/11oxC"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="KYck6AXH"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 42Tpr50tJhzF3CX for ; Tue, 9 Oct 2018 18:33:41 +1100 (AEDT) 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="YL/11oxC"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="KYck6AXH"; 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=66.111.4.27; helo=out3-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="YL/11oxC"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="KYck6AXH"; dkim-atps=neutral Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 42TpqF1GyTzF3Bd for ; Tue, 9 Oct 2018 18:32:57 +1100 (AEDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id CF19E21F46; Tue, 9 Oct 2018 03:32:54 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 09 Oct 2018 03:32:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h=from :to:cc:subject:date:message-id:in-reply-to:references; s=fm3; bh=6yWp0B8/dO9mhIozFkH9i0ET8fuWD9c5fSWljFaxcY0=; b=YL/11oxCdQKh YUFaAveCOKa1MlTkpdv3UdauIXV1hrDjjQUxwXpYsM+aHCcOVm9EGFUM2zPK5Inw r0lX9twL39VnbxaoM/mfbMii/7iu2yQpYJHDB9Rbfe5ALhhK3UB4IwPJzbsh0ywD zpRPu0hZdQEmwrEzusqLGNSsxFsXPb8rTnKOQzE8eSqk/nxNp2BY4/5HkT0uSA9B NFiuwnmAu9vFk8GDW0YGWQfldev6teoMSE5sXTAQxWMjJPThC5lIGMymtIZ9zK80 QmLuWd3TkAXApyNeZZxadMGwn1tiigvO5RTjnrPklgXsXvrI95U4AbiRUMpDVPI5 6z0ODvjrYw== 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-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=6yWp0B8/dO9mhIozFkH9i0ET8fuWD 9c5fSWljFaxcY0=; b=KYck6AXHHTKMDabfus8Mb5hKgbXRBz33Hsx1oLCZNThjn mGeZdhjFC9wEhyMJKxpoEnj/VnXoZUxF0Tttoigp3tkRPVywfHhYsiY3aeIGUpny authsfDyjplOTOkbPA6w+4mz8k11nBscgQtNo8fOASlnMFxuhKiN2pt4WXsLWCTM M9TpRkv+7x1ayGg021Cic2em4FrJUZaa+FCaF1G5DpaDkkrJ58Fk8RMYEEIzoqZ1 3rhfaqn53Xd0KpsdT8G1DcuWVfK/4/Ofh6UsSDm/I01Ic3UIQNnH0LIX6IDGE4tS Wv8R2vH4kB7pdRTTS5wSi1SCLR2fdg64Btm5+XTcw== X-ME-Sender: X-ME-Proxy: Received: from dave.ibm.com (50-203-181-99-static.hfc.comcastbusiness.net [50.203.181.99]) by mail.messagingengine.com (Postfix) with ESMTPA id 4593DE44D4; Tue, 9 Oct 2018 03:32:53 -0400 (EDT) From: Andrew Jeffery To: skiboot@lists.ozlabs.org Date: Tue, 9 Oct 2018 00:32:28 -0700 Message-Id: <20181009073237.16251-3-andrew@aj.id.au> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181009073237.16251-1-andrew@aj.id.au> References: <20181009073237.16251-1-andrew@aj.id.au> Subject: [Skiboot] [PATCH v3 02/11] core/lock: Use try_lock_caller() in lock_caller() to capture owner X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 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);