rpms/kernel/F-8 linux-2.6-freezer-fix-apm-emulation-breakage.patch, NONE, 1.1 patch-2.6.23.12.bz2.sign, NONE, 1.1 .cvsignore, 1.711, 1.712 kernel.spec, 1.306, 1.307 linux-2.6-compile-fixes.patch, 1.158, 1.159 sources, 1.672, 1.673 upstream, 1.593, 1.594 patch-2.6.23.10.bz2.sign, 1.1, NONE

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


Author: cebbert

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

Modified Files:
	.cvsignore kernel.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-98
- 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-8/.cvsignore,v
retrieving revision 1.711
retrieving revision 1.712
diff -u -r1.711 -r1.712
--- .cvsignore	15 Dec 2007 00:28:10 -0000	1.711
+++ .cvsignore	19 Dec 2007 00:44:05 -0000	1.712
@@ -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.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-8/kernel.spec,v
retrieving revision 1.306
retrieving revision 1.307
diff -u -r1.306 -r1.307
--- kernel.spec	15 Dec 2007 21:24:25 -0000	1.306
+++ kernel.spec	19 Dec 2007 00:44:05 -0000	1.307
@@ -33,7 +33,7 @@
 ## If this is a released kernel ##
 %if 0%{?released_kernel}
 # Do we have a 2.6.21.y update to apply?
-%define stable_update 10
+%define stable_update 12
 # Set rpm version accordingly
 %if 0%{?stable_update}
 %define stablerev .%{stable_update}
@@ -769,6 +769,8 @@
 Patch2203: linux-2.6-selinux-sigchld-wait.patch
 Patch2204: linux-2.6-selinux-ebitmap-loop-bug.patch
 
+Patch2300: linux-2.6-freezer-fix-apm-emulation-breakage.patch
+
 %endif
 
 BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root-%{_target_cpu}
@@ -1445,6 +1447,9 @@
 ApplyPatch linux-2.6-selinux-sigchld-wait.patch
 ApplyPatch linux-2.6-selinux-ebitmap-loop-bug.patch
 
+# removed in 2.6.23.10
+ApplyPatch linux-2.6-freezer-fix-apm-emulation-breakage.patch
+
 # END OF PATCH APPLICATIONS
 
 %endif
@@ -2041,6 +2046,10 @@
 
 
 %changelog
+* Tue Dec 18 2007 Chuck Ebbert <cebbert at redhat.com> 2.6.23.10-98
+- Linux 2.6.23.12
+- Add fixed version of APM emulation patch removed in 2.6.23.10
+
 * Sat Dec 15 2007 David Woodhouse <dwmw2 at redhat.com> 2.6.23.10-97
 - Fix IPv6 checksums for pasemi-mac
 

linux-2.6-compile-fixes.patch:

Index: linux-2.6-compile-fixes.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-8/linux-2.6-compile-fixes.patch,v
retrieving revision 1.158
retrieving revision 1.159
diff -u -r1.158 -r1.159
--- linux-2.6-compile-fixes.patch	15 Dec 2007 01:02:53 -0000	1.158
+++ linux-2.6-compile-fixes.patch	19 Dec 2007 00:44:05 -0000	1.159
@@ -4,79 +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.
 #
-
-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-8/sources,v
retrieving revision 1.672
retrieving revision 1.673
diff -u -r1.672 -r1.673
--- sources	15 Dec 2007 00:28:10 -0000	1.672
+++ sources	19 Dec 2007 00:44:05 -0000	1.673
@@ -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-8/upstream,v
retrieving revision 1.593
retrieving revision 1.594
diff -u -r1.593 -r1.594
--- upstream	15 Dec 2007 00:01:06 -0000	1.593
+++ upstream	19 Dec 2007 00:44:05 -0000	1.594
@@ -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