Re: apm emulation driver broken ?

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Franck Bui-Huu <vagabon.xyz@...>
Cc: <linux-pm@...>, lkml <linux-kernel@...>
Date: Saturday, November 17, 2007 - 7:09 am

On Saturday, 17 of November 2007, Rafael J. Wysocki wrote:

Actually, not even that one.  You're right anyway.

Below is a patch that IMO should fix the issue with apm_ioctl().

Greetings,
Rafael


---
From: Rafael J. Wysocki <rjw@sisk.pl>

The code in apm_ioctl() allows user space tasks waiting for a suspend to
complete to be woken up prematurely as a result of the thawing of tasks carried
out by the freezer.  Fix it.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
 drivers/char/apm-emulation.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/drivers/char/apm-emulation.c
===================================================================
--- linux-2.6.orig/drivers/char/apm-emulation.c
+++ linux-2.6/drivers/char/apm-emulation.c
@@ -364,7 +364,7 @@ apm_ioctl(struct inode * inode, struct f
 			 */
 			flags = current->flags;
 
-			wait_event_interruptible(apm_suspend_waitqueue,
+			wait_event_freezable(apm_suspend_waitqueue,
 					 as->suspend_state == SUSPEND_DONE);
 		}
 
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
apm emulation driver broken ?, Franck Bui-Huu, (Fri Nov 16, 11:06 am)
Re: apm emulation driver broken ?, Rafael J. Wysocki, (Fri Nov 16, 12:20 pm)
Re: apm emulation driver broken ?, Franck Bui-Huu, (Fri Nov 16, 1:29 pm)
Re: apm emulation driver broken ?, Rafael J. Wysocki, (Fri Nov 16, 5:20 pm)
Re: apm emulation driver broken ?, Franck Bui-Huu, (Sat Nov 17, 4:53 am)
Re: apm emulation driver broken ?, Rafael J. Wysocki, (Sat Nov 17, 5:59 am)
Re: apm emulation driver broken ?, Franck Bui-Huu, (Sat Nov 17, 7:57 am)
Re: apm emulation driver broken ?, Rafael J. Wysocki, (Sat Nov 17, 8:46 am)
Re: apm emulation driver broken ?, Franck Bui-Huu, (Sun Nov 18, 3:57 pm)
Re: apm emulation driver broken ?, Rafael J. Wysocki, (Sun Nov 18, 6:22 pm)
Re: apm emulation driver broken ?, Franck Bui-Huu, (Mon Nov 19, 9:05 am)
Re: apm emulation driver broken ?, Rafael J. Wysocki, (Tue Nov 20, 9:32 pm)
Re: apm emulation driver broken ?, Rafael J. Wysocki, (Sat Nov 17, 7:09 am)