From patchwork Wed Oct 26 07:40:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lv Zheng X-Patchwork-Id: 9396179 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3778460234 for ; Wed, 26 Oct 2016 07:40:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F31B6298DA for ; Wed, 26 Oct 2016 07:40:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E71E3298DC; Wed, 26 Oct 2016 07:40:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9867B298DA for ; Wed, 26 Oct 2016 07:40:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756253AbcJZHk2 (ORCPT ); Wed, 26 Oct 2016 03:40:28 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:34817 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754755AbcJZHkZ (ORCPT ); Wed, 26 Oct 2016 03:40:25 -0400 Received: by mail-oi0-f65.google.com with SMTP id n202so6941696oig.2; Wed, 26 Oct 2016 00:40:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=mWgEY5jAiDF+1v77OpHQ+qYt9M7B/YCNplUcmTYPmLI=; b=aiNNmBsP0+KcyLn1Fm3tbKifqU+XxuLvArBSincWIJF9Kj6co72RCrkTfFuvzXFrJG 2lMXqm1YGcLqTvOLeA3fr25A2Fof0aBtlVue6r2dxYmZu4690KGMfqpeUA/b9ck0LfG1 AeZOFwDl9RZleDgjNz2fKiNvZMjPd6Xn7WICX6wPVSQvtBNvq5TCXHy0eUBB5yhN8v37 S/WYss7QgnYm9XgHHzSlSeGpxC1q9mq3I5VhdHfIPI0QtUC8w7gQfCAZWQv2l0dhEIJY RPSrtzA2UFhJE83Lt+r0OOTwrsx0XDnjggzTd5bcT0JS18+wOIWaIBhMbMmIGfwFs6UD X4Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=mWgEY5jAiDF+1v77OpHQ+qYt9M7B/YCNplUcmTYPmLI=; b=mcJbXLx+rQUuDItxCKCqqOUYzv4PI14NiRRcNgnkO7ZJoJ+8pG/D+mbV+8lc5ldHAH PqtHKniDE2/FLziwGMBsBhIaJ50DD4/bPfHRT0i/l+htaptHplTAw+rIYFhHEelUOkeg JkuP63f83W8/RzRrSoatdB6jYhBCtpyjXhd6cl5dEunRwe2B9KQSxu4UM5KEDbPWsfuM Xh5lSadUU0GxWg1H1ULhnHRTllPZ8m9R4OsHeyE1DIFZfvIPJVr/YmL0XYm4V/HASyD3 7eA0bu7P7nERSJYOS+3Xg64JlI0NxY69KIeETvaoqv600KLSte7g2Pm612IQj8sxrFl7 fghQ== X-Gm-Message-State: ABUngvcE/u+k1lxh6CS73ElUasVz9sKYUsn5B+6LUI5mcKSvCeWhfMfi3kuOF7pcUQuhHQ== X-Received: by 10.157.19.44 with SMTP id f41mr509781ote.15.1477467624359; Wed, 26 Oct 2016 00:40:24 -0700 (PDT) Received: from localhost.localdomain (h3.246.129.40.static.ip.windstream.net. [40.129.246.3]) by smtp.gmail.com with ESMTPSA id r5sm258184otr.31.2016.10.26.00.40.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 26 Oct 2016 00:40:24 -0700 (PDT) From: Lv Zheng X-Google-Original-From: Lv Zheng To: "Rafael J . Wysocki" , "Rafael J . Wysocki" , Len Brown Cc: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, Lv Zheng Subject: [PATCH v2 2/3] ACPICA: Dispatcher: Fix an unbalanced lock exit path in acpi_ds_auto_serialize_method() Date: Wed, 26 Oct 2016 15:40:20 +0800 Message-Id: <56eca17f372ccd8585bd855bff0e0d0680f658c7.1477465173.git.lv.zheng@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There is a lock unbalanced exit path in acpi_ds_initialize_method(), this patch corrects it. Lv Zheng. Fixes: 441ad11d078f ("ACPICA: Dispatcher: Fix a mutex issue for method auto serialization") Tested-by: Imre Deak Signed-off-by: Lv Zheng --- drivers/acpi/acpica/dsmethod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/acpica/dsmethod.c b/drivers/acpi/acpica/dsmethod.c index c4028a8..5997e59 100644 --- a/drivers/acpi/acpica/dsmethod.c +++ b/drivers/acpi/acpica/dsmethod.c @@ -128,7 +128,7 @@ acpi_ds_auto_serialize_method(struct acpi_namespace_node *node, if (ACPI_FAILURE(status)) { acpi_ds_delete_walk_state(walk_state); acpi_ps_free_op(op); - return_ACPI_STATUS(status); + goto unlock; } walk_state->descending_callback = acpi_ds_detect_named_opcodes;