ACPI: Run fixed event device notifications in process context
authorLan Tianyu <tianyu.lan@intel.com>
Mon, 25 Aug 2014 23:29:24 +0000 (01:29 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 25 Aug 2014 23:29:24 +0000 (01:29 +0200)
commit236105db632c6279a020f78c83e22eaef746006b
tree9d18863a173a5a2af1c0cb88a656631906be04f5
parentfc2e0a8326d1b21d11ef8213298e5302867fed2c
ACPI: Run fixed event device notifications in process context

Currently, notify callbacks for fixed button events are run from
interrupt context.  That is not necessary and after commit 0bf6368ee8f2
(ACPI / button: Add ACPI Button event via netlink routine) it causes
netlink routines to be called from interrupt context which is not
correct.

Also, that is different from non-fixed device events (including
non-fixed button events) whose notify callbacks are all executed from
process context.

For the above reasons, make fixed button device notify callbacks run
in process context which will avoid the deadlock when using netlink
to report button events to user space.

Fixes: 0bf6368ee8f2 (ACPI / button: Add ACPI Button event via netlink routine)
Link: https://lkml.org/lkml/2014/8/21/606
Reported-by: Benjamin Block <bebl@mageta.org>
Reported-by: Knut Petersen <Knut_Petersen@t-online.de>
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
[rjw: Function names, subject and changelog.]
Cc: 3.15+ <stable@vger.kernel.org> # 3.15+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/scan.c