Skip to content

Commit

Permalink
ACPI / debugger: Fix an issue a flag is modified without locking
Browse files Browse the repository at this point in the history
There is one line of code, executed out of locking due to rebase mistakes.
This patch fixes this issue.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Lv Zheng authored and Rafael J. Wysocki committed Dec 28, 2015
1 parent 836d083 commit 73af2d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/acpi/acpi_dbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 73af2d5

Please sign in to comment.