[PATCH] convert a for (i = 0 ; i < NR_CPUS ; i++) to for_each_cpu(i) in sched_init()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This one was not triggered by yesterday patch : My test machine doesnt crash when dereferencing (runqueue_t *)0x3420, I wonder why ?

[PATCH] converts a for (i = 0 ; i < NR_CPUS ; i++) to for_each_cpu(i) in sched_init().


Signed-off-by: Eric Dumazet <[email protected]>

--- kernel/sched.c.orig	2006-01-25 10:28:15.000000000 +0100
+++ kernel/sched.c	2006-01-25 10:28:32.000000000 +0100
@@ -6258,7 +6258,7 @@
 	runqueue_t *rq;
 	int i, j, k;
 
-	for (i = 0; i < NR_CPUS; i++) {
+	for_each_cpu(i) {
 		prio_array_t *array;
 
 		rq = cpu_rq(i);

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux