]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
ACPI: thinkpad-acpi: allow for syscall restart in sysfs handlers
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Tue, 30 Oct 2007 19:46:24 +0000 (17:46 -0200)
committerLen Brown <len.brown@intel.com>
Mon, 5 Nov 2007 18:07:11 +0000 (13:07 -0500)
commitfc589a3ce5f38db6239c147da4f9172a25575ecc
tree3732f557e21ef93787a0ebfcad4323ec00165dea
parentb856f5b8c022b75bb0504a8c1ce16a5f1656e08b
ACPI: thinkpad-acpi: allow for syscall restart in sysfs handlers

Map an mutex_lock_interruptible() error return into ERESTARTSYS, as the
only possible error from mutex_lock_interruptible is EINTR, and that will
only happen if signal_pending() causes the mutex lock attempt to abort.

This still allows signals to be delivered ASAP, which is much nicer than
just doing mutex_lock, and still shadows userspace from EINTR when
SA_RESTART is active.

Problem reported by Peter Jordan.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Peter Jordan <usernetwork@gmx.info>
Cc: Richard Neill <rn214@hermes.cam.ac.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/misc/thinkpad_acpi.c