rpms/kernel/F-7 linux-2.6-freezer-fix-apm-emulation-breakage.patch, NONE, 1.1 patch-2.6.23.12.bz2.sign, NONE, 1.1 .cvsignore, 1.641, 1.642 kernel-2.6.spec, 1.3402, 1.3403 linux-2.6-compile-fixes.patch, 1.152, 1.153 sources, 1.604, 1.605 upstream, 1.528, 1.529 patch-2.6.23.10.bz2.sign, 1.1, NONE

Chuck Ebbert (cebbert) fedora-extras-commits at redhat.com
Wed Dec 19 00:44:27 UTC 2007


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23292

Modified Files:
	.cvsignore kernel-2.6.spec linux-2.6-compile-fixes.patch 
	sources upstream 
Added Files:
	linux-2.6-freezer-fix-apm-emulation-breakage.patch 
	patch-2.6.23.12.bz2.sign 
Removed Files:
	patch-2.6.23.10.bz2.sign 
Log Message:
* Tue Dec 18 2007 Chuck Ebbert <cebbert at redhat.com> 2.6.23.10-52
- Linux 2.6.23.12
- Add fixed version of APM emulation patch removed in 2.6.23.10


linux-2.6-freezer-fix-apm-emulation-breakage.patch:

--- NEW FILE linux-2.6-freezer-fix-apm-emulation-breakage.patch ---
>From cb43c54ca05c01533c45e4d3abfe8f99b7acf624 Mon Sep 17 00:00:00 2001
From: Rafael J. Wysocki <rjw at sisk.pl>
Date: Wed, 21 Nov 2007 02:53:14 +0100
Subject: Freezer: Fix APM emulation breakage

From: Rafael J. Wysocki <rjw at sisk.pl>

patch cb43c54ca05c01533c45e4d3abfe8f99b7acf624 in mainline.

The APM emulation is currently broken as a result of commit
831441862956fffa17b9801db37e6ea1650b0f69
"Freezer: make kernel threads nonfreezable by default"
that removed the PF_NOFREEZE annotations from apm_ioctl() without adding
the appropriate freezer hooks.  Fix it and remove the unnecessary variable flags
from apm_ioctl().

Special thanks to Franck Bui-Huu <vagabon.xyz at gmail.com> for pointing out the
problem.

Signed-off-by: Rafael J. Wysocki <rjw at sisk.pl>
Cc: Pavel Machek <pavel at ucw.cz>
Cc: Franck Bui-Huu <vagabon.xyz at gmail.com>
Cc: Nigel Cunningham <nigel at nigel.suspend2.net>
Signed-off-by: Len Brown <len.brown at intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>

Plus:
>From:

Commit:     e42837bcd35b75bb59ae5d3e62f87be1aeeb05c3
Parent:     2e1318956ce6bf149af5c5e98499b5cd99f99c89
Author:     Rafael J. Wysocki <rjw at sisk.pl>
AuthorDate: Thu Oct 18 03:04:45 2007 -0700
Committer:  Linus Torvalds <torvalds at woody.linux-foundation.org>
CommitDate: Thu Oct 18 14:37:19 2007 -0700

    freezer: introduce freezer-friendly waiting macros

---
 drivers/char/apm-emulation.c |   15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

--- a/drivers/char/apm-emulation.c
+++ b/drivers/char/apm-emulation.c
@@ -295,7 +295,6 @@ static int
 apm_ioctl(struct inode * inode, struct file *filp, u_int cmd, u_long arg)
 {
 	struct apm_user *as = filp->private_data;
-	unsigned long flags;
 	int err = -EINVAL;
 
 	if (!as->suser || !as->writer)
@@ -331,10 +330,16 @@ apm_ioctl(struct inode * inode, struct f
 			 * Wait for the suspend/resume to complete.  If there
 			 * are pending acknowledges, we wait here for them.
 			 */
-			flags = current->flags;
+			freezer_do_not_count();
 
 			wait_event(apm_suspend_waitqueue,
 				   as->suspend_state == SUSPEND_DONE);
+
+			/*
+			 * Since we are waiting until the suspend is done, the
+			 * try_to_freeze() in freezer_count() will not trigger
+			 */
+			freezer_count();
 		} else {
 			as->suspend_state = SUSPEND_WAIT;
 			mutex_unlock(&state_lock);
@@ -362,14 +367,10 @@ apm_ioctl(struct inode * inode, struct f
 			 * Wait for the suspend/resume to complete.  If there
 			 * are pending acknowledges, we wait here for them.
 			 */
-			flags = current->flags;
-
-			wait_event_interruptible(apm_suspend_waitqueue,
+			wait_event_freezable(apm_suspend_waitqueue,
 					 as->suspend_state == SUSPEND_DONE);
 		}
 
-		current->flags = flags;
-
 		mutex_lock(&state_lock);
 		err = as->suspend_result;
 		as->suspend_state = SUSPEND_NONE;
--- a/include/linux/freezer.h
+++ b/include/linux/freezer.h
@@ -4,6 +4,7 @@
 #define FREEZER_H_INCLUDED
 
 #include <linux/sched.h>
+#include <linux/wait.h>
 
 #ifdef CONFIG_PM_SLEEP
 /*
@@ -126,6 +127,36 @@ static inline void set_freezable(void)
 	current->flags &= ~PF_NOFREEZE;
 }
 
+/*
+ * Freezer-friendly wrappers around wait_event_interruptible() and
+ * wait_event_interruptible_timeout(), originally defined in <linux/wait.h>
+ */
+
+#define wait_event_freezable(wq, condition)				\
+({									\
+	int __retval;							\
+	do {								\
+		__retval = wait_event_interruptible(wq, 		\
+				(condition) || freezing(current));	\
+		if (__retval && !freezing(current))			\
+			break;						\
+		else if (!(condition))					\
+			__retval = -ERESTARTSYS;			\
+	} while (try_to_freeze());					\
+	__retval;							\
+})
+
+
+#define wait_event_freezable_timeout(wq, condition, timeout)		\
+({									\
+	long __retval = timeout;					\
+	do {								\
+		__retval = wait_event_interruptible_timeout(wq,		\
+				(condition) || freezing(current),	\
+				__retval); 				\
+	} while (try_to_freeze());					\
+	__retval;							\
+})
 #else /* !CONFIG_PM_SLEEP */
 static inline int frozen(struct task_struct *p) { return 0; }
 static inline int freezing(struct task_struct *p) { return 0; }
@@ -143,6 +174,13 @@ static inline void freezer_do_not_count(void) {}
 static inline void freezer_count(void) {}
 static inline int freezer_should_skip(struct task_struct *p) { return 0; }
 static inline void set_freezable(void) {}
+
+#define wait_event_freezable(wq, condition)				\
+		wait_event_interruptible(wq, condition)
+
+#define wait_event_freezable_timeout(wq, condition, timeout)		\
+		wait_event_interruptible_timeout(wq, condition, timeout)
+
 #endif /* !CONFIG_PM_SLEEP */
 
 #endif	/* FREEZER_H_INCLUDED */


--- NEW FILE patch-2.6.23.12.bz2.sign ---
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: See http://www.kernel.org/signature.html for info

iD8DBQBHaE2QyGugalF9Dw4RAhp4AJ4jcsd74C4bQMwHrynTJAZybXAlsgCghLI1
1XJuBJDFkd+LSzBeZ8xN6as=
=ioNb
-----END PGP SIGNATURE-----


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/.cvsignore,v
retrieving revision 1.641
retrieving revision 1.642
diff -u -r1.641 -r1.642
--- .cvsignore	15 Dec 2007 00:39:38 -0000	1.641
+++ .cvsignore	19 Dec 2007 00:43:37 -0000	1.642
@@ -3,4 +3,4 @@
 temp-*
 kernel-2.6.23
 linux-2.6.23.tar.bz2
-patch-2.6.23.10.bz2
+patch-2.6.23.12.bz2


Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/kernel-2.6.spec,v
retrieving revision 1.3402
retrieving revision 1.3403
diff -u -r1.3402 -r1.3403
--- kernel-2.6.spec	15 Dec 2007 01:30:48 -0000	1.3402
+++ kernel-2.6.spec	19 Dec 2007 00:43:37 -0000	1.3403
@@ -30,7 +30,7 @@
 ## If this is a released kernel ##
 %if 0%{?released_kernel}
 # Do we have a 2.6.x.y update to apply?
-%define stable_update 10
+%define stable_update 12
 # Set rpm version accordingly
 %if 0%{?stable_update}
 %define stablerev .%{stable_update}
@@ -651,6 +651,8 @@
 
 Patch1500: linux-2.6-pmtrace-time-fix.patch
 
+Patch2300: linux-2.6-freezer-fix-apm-emulation-breakage.patch
+
 %endif
 
 BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root-%{_target_cpu}
@@ -1365,6 +1367,9 @@
 # Fix time distortion in pm_trace (bz 250238)
 ApplyPatch linux-2.6-pmtrace-time-fix.patch
 
+# removed in 2.6.23.10
+ApplyPatch linux-2.6-freezer-fix-apm-emulation-breakage.patch
+
 #
 # misc small stuff to make things compile
 #
@@ -2295,6 +2300,10 @@
 %endif
 
 %changelog
+* Tue Dec 18 2007 Chuck Ebbert <cebbert at redhat.com> 2.6.23.10-52
+- Linux 2.6.23.12
+- Add fixed version of APM emulation patch removed in 2.6.23.10
+
 * Thu Dec 14 2007 Chuck Ebbert <cebbert at redhat.com> 2.6.23.10-51
 - Add compile fixes.
 

linux-2.6-compile-fixes.patch:

Index: linux-2.6-compile-fixes.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/linux-2.6-compile-fixes.patch,v
retrieving revision 1.152
retrieving revision 1.153
diff -u -r1.152 -r1.153
--- linux-2.6-compile-fixes.patch	15 Dec 2007 01:30:48 -0000	1.152
+++ linux-2.6-compile-fixes.patch	19 Dec 2007 00:43:37 -0000	1.153
@@ -4,81 +4,3 @@
 # Please add the errors from gcc before the diffs to save others having
 # to do a compile to figure out what your diff is fixing. Thanks.
 #
-
-[wait_event_freezable() is missing in 2.6.23.10]
-
-From:
-
-Commit:     e42837bcd35b75bb59ae5d3e62f87be1aeeb05c3
-Parent:     2e1318956ce6bf149af5c5e98499b5cd99f99c89
-Author:     Rafael J. Wysocki <rjw at sisk.pl>
-AuthorDate: Thu Oct 18 03:04:45 2007 -0700
-Committer:  Linus Torvalds <torvalds at woody.linux-foundation.org>
-CommitDate: Thu Oct 18 14:37:19 2007 -0700
-
-    freezer: introduce freezer-friendly waiting macros
-
-
-diff --git a/include/linux/freezer.h b/include/linux/freezer.h
-index efded00..0893499 100644
---- a/include/linux/freezer.h
-+++ b/include/linux/freezer.h
-@@ -4,6 +4,7 @@
- #define FREEZER_H_INCLUDED
- 
- #include <linux/sched.h>
-+#include <linux/wait.h>
- 
- #ifdef CONFIG_PM_SLEEP
- /*
-@@ -126,6 +127,36 @@ static inline void set_freezable(void)
- 	current->flags &= ~PF_NOFREEZE;
- }
- 
-+/*
-+ * Freezer-friendly wrappers around wait_event_interruptible() and
-+ * wait_event_interruptible_timeout(), originally defined in <linux/wait.h>
-+ */
-+
-+#define wait_event_freezable(wq, condition)				\
-+({									\
-+	int __retval;							\
-+	do {								\
-+		__retval = wait_event_interruptible(wq, 		\
-+				(condition) || freezing(current));	\
-+		if (__retval && !freezing(current))			\
-+			break;						\
-+		else if (!(condition))					\
-+			__retval = -ERESTARTSYS;			\
-+	} while (try_to_freeze());					\
-+	__retval;							\
-+})
-+
-+
-+#define wait_event_freezable_timeout(wq, condition, timeout)		\
-+({									\
-+	long __retval = timeout;					\
-+	do {								\
-+		__retval = wait_event_interruptible_timeout(wq,		\
-+				(condition) || freezing(current),	\
-+				__retval); 				\
-+	} while (try_to_freeze());					\
-+	__retval;							\
-+})
- #else /* !CONFIG_PM_SLEEP */
- static inline int frozen(struct task_struct *p) { return 0; }
- static inline int freezing(struct task_struct *p) { return 0; }
-@@ -143,6 +174,13 @@ static inline void freezer_do_not_count(void) {}
- static inline void freezer_count(void) {}
- static inline int freezer_should_skip(struct task_struct *p) { return 0; }
- static inline void set_freezable(void) {}
-+
-+#define wait_event_freezable(wq, condition)				\
-+		wait_event_interruptible(wq, condition)
-+
-+#define wait_event_freezable_timeout(wq, condition, timeout)		\
-+		wait_event_interruptible_timeout(wq, condition, timeout)
-+
- #endif /* !CONFIG_PM_SLEEP */
- 
- #endif	/* FREEZER_H_INCLUDED */


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/sources,v
retrieving revision 1.604
retrieving revision 1.605
diff -u -r1.604 -r1.605
--- sources	15 Dec 2007 00:39:38 -0000	1.604
+++ sources	19 Dec 2007 00:43:37 -0000	1.605
@@ -1,2 +1,2 @@
 2cc2fd4d521dc5d7cfce0d8a9d1b3472  linux-2.6.23.tar.bz2
-a4bbc34b1d4c5fcd2ec16377292e51bb  patch-2.6.23.10.bz2
+5932b5043abe8ca1ac7ee1ed73fa5e91  patch-2.6.23.12.bz2


Index: upstream
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/upstream,v
retrieving revision 1.528
retrieving revision 1.529
diff -u -r1.528 -r1.529
--- upstream	15 Dec 2007 00:39:38 -0000	1.528
+++ upstream	19 Dec 2007 00:43:37 -0000	1.529
@@ -1,2 +1,2 @@
 linux-2.6.23.tar.bz2
-patch-2.6.23.10.bz2
+patch-2.6.23.12.bz2


--- patch-2.6.23.10.bz2.sign DELETED ---




More information about the fedora-extras-commits mailing list