Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=58c0a4a7864b2dad6da4090813322fcd29a11c92
Commit:     58c0a4a7864b2dad6da4090813322fcd29a11c92
Parent:     37b07e4163f7306aa735a6e250e8d22293e5b8de
Author:     Yasunori Goto <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 16 01:25:40 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Oct 16 09:42:59 2007 -0700

    Fix panic of cpu online with memory less node
    
    When a cpu is onlined on memory-less-node box, kernel panics due to touch
    NULL pointer of pgdat->kswapd.  Current kswapd runs only nodes which have
    memory.  So, calling of set_cpus_allowed() is not necessary for memory-less
    node.
    
    This is fix for it.
    
    Signed-off-by: Yasunori Goto <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 mm/vmscan.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 8fd8ba1..cb8ad3c 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1694,9 +1694,11 @@ static int __devinit cpu_callback(struct notifier_block 
*nfb,
 {
        pg_data_t *pgdat;
        cpumask_t mask;
+       int nid;
 
        if (action == CPU_ONLINE || action == CPU_ONLINE_FROZEN) {
-               for_each_online_pgdat(pgdat) {
+               for_each_node_state(nid, N_HIGH_MEMORY) {
+                       pgdat = NODE_DATA(nid);
                        mask = node_to_cpumask(pgdat->node_id);
                        if (any_online_cpu(mask) != NR_CPUS)
                                /* One of our CPUs online: restore mask */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to