rpms/kernel/F-10 linux-2.6-lib-idr-fix-bug-introduced-by-rcu-fix.patch, NONE, 1.1 kernel.spec, 1.1183, 1.1184 linux-2.6-lib-idr.c-fix-rcu-related-race-with-idr_find.patch, 1.1, NONE
Chuck Ebbert
cebbert at fedoraproject.org
Thu Dec 11 23:57:29 UTC 2008
- Previous message (by thread): rpms/gstreamer-plugins-farsight/devel .cvsignore, 1.10, 1.11 gstreamer-plugins-farsight.spec, 1.18, 1.19 sources, 1.10, 1.11
- Next message (by thread): rpms/kernel/F-9 linux-2.6-gspca-vc0321-fix-frame-overflow.patch, NONE, 1.1 kernel.spec, 1.876, 1.877
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: cebbert
Update of /cvs/pkgs/rpms/kernel/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv31731
Modified Files:
kernel.spec
Added Files:
linux-2.6-lib-idr-fix-bug-introduced-by-rcu-fix.patch
Removed Files:
linux-2.6-lib-idr.c-fix-rcu-related-race-with-idr_find.patch
Log Message:
Fix IDR allocator bug introduced in 2.6.27.8
linux-2.6-lib-idr-fix-bug-introduced-by-rcu-fix.patch:
--- NEW FILE linux-2.6-lib-idr-fix-bug-introduced-by-rcu-fix.patch ---
From: Manfred Spraul <manfred at colorfullife.com>
Date: Wed, 10 Dec 2008 17:17:06 +0000 (+0100)
Subject: lib/idr.c: Fix bug introduced by RCU fix
X-Git-Tag: v2.6.28-rc8~4
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=711a49a07f84f914aac26a52143f6e7526571143
lib/idr.c: Fix bug introduced by RCU fix
The last patch to lib/idr.c caused a bug if idr_get_new_above() was
called on an empty idr.
Usually, nodes stay on the same layer. New layers are added to the top
of the tree.
The exception is idr_get_new_above() on an empty tree: In this case, the
new root node is first added on layer 0, then moved upwards. p->layer
was not updated.
As usual: You shall never rely on the source code comments, they will
only mislead you.
Signed-off-by: Manfred Spraul <manfred at colorfullife.com>
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
---
diff --git a/lib/idr.c b/lib/idr.c
index 7a785a0..1c4f928 100644
--- a/lib/idr.c
+++ b/lib/idr.c
@@ -220,8 +220,14 @@ build_up:
*/
while ((layers < (MAX_LEVEL - 1)) && (id >= (1 << (layers*IDR_BITS)))) {
layers++;
- if (!p->count)
+ if (!p->count) {
+ /* special case: if the tree is currently empty,
+ * then we grow the tree by moving the top node
+ * upwards.
+ */
+ p->layer++;
continue;
+ }
if (!(new = get_from_free_list(idp))) {
/*
* The allocation failed. If we built part of
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-10/kernel.spec,v
retrieving revision 1.1183
retrieving revision 1.1184
diff -u -r1.1183 -r1.1184
--- kernel.spec 11 Dec 2008 23:10:46 -0000 1.1183
+++ kernel.spec 11 Dec 2008 23:56:58 -0000 1.1184
@@ -575,12 +575,13 @@
%if !%{nopatches}
# revert upstream patches we get via other methods
-# revert 2.6.27.8 idr patch that breaks DRM
-Patch08: linux-2.6-lib-idr.c-fix-rcu-related-race-with-idr_find.patch
Patch09: linux-2.6-upstream-reverts.patch
# Git trees.
Patch10: git-cpufreq.patch
+# fix idr bug in 27.8
+Patch12: linux-2.6-lib-idr-fix-bug-introduced-by-rcu-fix.patch
+
# Standalone patches
Patch20: linux-2.6-hotfixes.patch
@@ -1088,9 +1089,6 @@
%if !%{nopatches}
-# revert IDR patch from 2.6.27.8
-ApplyPatch linux-2.6-lib-idr.c-fix-rcu-related-race-with-idr_find.patch -R
-
# revert patches from upstream that conflict or that we get via other means
C=$(wc -l $RPM_SOURCE_DIR/linux-2.6-upstream-reverts.patch | awk '{print $1}')
if [ "$C" -gt 10 ]; then
@@ -1099,6 +1097,8 @@
ApplyPatch git-cpufreq.patch
+ApplyPatch linux-2.6-lib-idr-fix-bug-introduced-by-rcu-fix.patch
+
ApplyPatch linux-2.6-hotfixes.patch
# Roland's utrace ptrace replacement.
@@ -1918,6 +1918,9 @@
%kernel_variant_files -k vmlinux %{with_kdump} kdump
%changelog
+* Fri Dec 12 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.27.8-148
+- Fix IDR allocator bug introduced in 2.6.27.8
+
* Fri Dec 12 2008 Dave Airlie <airlied at redhat.com> 2.6.27.8-147
- modeset - fix AGP without kms + fix endian parser/pll programming
@@ -1928,6 +1931,7 @@
- Fix vc0321 based webcams (rh 474990)
* Tue Dec 09 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.27.8-144
+* Tue Dec 09 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.27.8-144
- Revert idr patch from 2.6.27.8 that caused DRM breakage.
* Mon Dec 08 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.27.8-143
--- linux-2.6-lib-idr.c-fix-rcu-related-race-with-idr_find.patch DELETED ---
- Previous message (by thread): rpms/gstreamer-plugins-farsight/devel .cvsignore, 1.10, 1.11 gstreamer-plugins-farsight.spec, 1.18, 1.19 sources, 1.10, 1.11
- Next message (by thread): rpms/kernel/F-9 linux-2.6-gspca-vc0321-fix-frame-overflow.patch, NONE, 1.1 kernel.spec, 1.876, 1.877
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list