[Armadeus-commitlog] armadeus branch, master, updated. armadeus-5.3-563-g16339cf
Brought to you by:
sszy
|
From: Julien B a. A. <ar...@us...> - 2015-01-28 10:27:07
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 16339cfb2fad63503d443a72f18475ff2d36cc7a (commit)
from e70adcd6e47c5cd7bb5c89ada2ac341ea3abaea8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 16339cfb2fad63503d443a72f18475ff2d36cc7a
Author: Julien Boibessot <jul...@ar...>
Date: Wed Jan 28 11:26:32 2015 +0100
[LINUX] 2.6.29: Fixes division by zero when lots of processes are created
-----------------------------------------------------------------------
Summary of changes:
.../2.6.29/443-armadeus-fixes-div-by-zero.patch | 41 ++++++++++++++++++++
1 files changed, 41 insertions(+), 0 deletions(-)
create mode 100644 patches/linux/2.6.29/443-armadeus-fixes-div-by-zero.patch
diff --git a/patches/linux/2.6.29/443-armadeus-fixes-div-by-zero.patch b/patches/linux/2.6.29/443-armadeus-fixes-div-by-zero.patch
new file mode 100644
index 0000000..71e1951
--- /dev/null
+++ b/patches/linux/2.6.29/443-armadeus-fixes-div-by-zero.patch
@@ -0,0 +1,41 @@
+Fixes kernel oops (division by zero), under certain circumstances (lot of
+processes created).
+
+To test it:
+ #/bin/sh
+
+ while true; do
+ usleep 10000
+ toto=$(date)
+ toto=`date`
+ echo $toto > /dev/null
+ done
+
+Signed-off-by: Julien Boibessot <jul...@ar...>
+
+Index: linux-2.6.29.6/kernel/sched.c
+===================================================================
+--- linux-2.6.29.6.orig/kernel/sched.c 2009-07-03 01:41:20.000000000 +0200
++++ linux-2.6.29.6/kernel/sched.c 2015-01-22 10:24:43.078805869 +0100
+@@ -1288,13 +1288,19 @@
+ struct load_weight *lw)
+ {
+ u64 tmp;
++ unsigned long tmp2;
+
+ if (!lw->inv_weight) {
+ if (BITS_PER_LONG > 32 && unlikely(lw->weight >= WMULT_CONST))
+ lw->inv_weight = 1;
+- else
++ else {
++ if (lw->weight+1 == 0) /* u32 overflow */
++ tmp2 = lw->weight;
++ else
++ tmp2 = lw->weight+1;
+ lw->inv_weight = 1 + (WMULT_CONST-lw->weight/2)
+- / (lw->weight+1);
++ / tmp2;
++ }
+ }
+
+ tmp = (u64)delta_exec * weight;
hooks/post-receive
--
armadeus
|