Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932725AbbLXGQc (ORCPT ); Thu, 24 Dec 2015 01:16:32 -0500 Received: from mga04.intel.com ([192.55.52.120]:16910 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932251AbbLXGQa (ORCPT ); Thu, 24 Dec 2015 01:16:30 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,472,1444719600"; d="scan'208";a="847563636" From: Lv Zheng To: "Rafael J. Wysocki" , Len Brown Cc: Lv Zheng , Lv Zheng , , linux-acpi@vger.kernel.org Subject: [PATCH] ACPI / debugger: Fix an issue a flag is modified without locking Date: Thu, 24 Dec 2015 14:16:26 +0800 Message-Id: X-Mailer: git-send-email 1.7.10 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1105 Lines: 32 There is one line of code, executed out of locking due to rebase mistakes. This patch fixes this issue. Signed-off-by: Lv Zheng --- drivers/acpi/acpi_dbg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/acpi_dbg.c b/drivers/acpi/acpi_dbg.c index 381beb2..fa18bd0 100644 --- a/drivers/acpi/acpi_dbg.c +++ b/drivers/acpi/acpi_dbg.c @@ -516,10 +516,10 @@ static int acpi_aml_open(struct inode *inode, struct file *file) ret = -EINVAL; goto err_lock; } - acpi_aml_io.flags |= ACPI_AML_OPENED; pr_debug("Debugger thread initialized.\n"); mutex_lock(&acpi_aml_io.lock); + acpi_aml_io.flags |= ACPI_AML_OPENED; acpi_aml_io.out_crc.head = acpi_aml_io.out_crc.tail = 0; acpi_aml_io.in_crc.head = acpi_aml_io.in_crc.tail = 0; pr_debug("Debugger interface opened.\n"); -- 1.7.10 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/