CPU_MASK_ALL and CPU_MASK_NONE may only be used for initialisers. It doesn't compile if NS_CPUS>4*BITS_PER_LONG. --- 25-akpm/kernel/kmod.c | 5 +++-- 25-akpm/kernel/kthread.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff -puN kernel/kmod.c~set_cpus_allowed-fix kernel/kmod.c --- 25/kernel/kmod.c~set_cpus_allowed-fix Sun Feb 1 02:21:19 2004 +++ 25-akpm/kernel/kmod.c Sun Feb 1 02:21:19 2004 @@ -159,6 +159,7 @@ struct subprocess_info { static int ____call_usermodehelper(void *data) { struct subprocess_info *sub_info = data; + static cpumask_t all_cpus = CPU_MASK_ALL; int retval; /* Unblock all signals. */ @@ -170,12 +171,12 @@ static int ____call_usermodehelper(void spin_unlock_irq(¤t->sighand->siglock); /* We can run anywhere, unlike our parent keventd(). */ - set_cpus_allowed(current, CPU_MASK_ALL); + set_cpus_allowed(current, all_cpus); /* As a kernel thread which was bound to a specific cpu, migrate_all_tasks wouldn't touch us. Avoid running child on dying CPU. */ if (cpu_is_offline(smp_processor_id())) - migrate_to_cpu(any_online_cpu(CPU_MASK_ALL)); + migrate_to_cpu(any_online_cpu(all_cpus)); retval = -EPERM; if (current->fs->root) diff -puN kernel/kthread.c~set_cpus_allowed-fix kernel/kthread.c --- 25/kernel/kthread.c~set_cpus_allowed-fix Sun Feb 1 02:21:19 2004 +++ 25-akpm/kernel/kthread.c Sun Feb 1 02:21:19 2004 @@ -35,6 +35,7 @@ static int kthread(void *_create) void *data; sigset_t blocked; int ret = -EINTR; + static cpumask_t all_cpus = CPU_MASK_ALL; /* Copy data: it's on keventd's stack */ threadfn = create->threadfn; @@ -46,13 +47,13 @@ static int kthread(void *_create) flush_signals(current); /* By default we can run anywhere, unlike keventd. */ - set_cpus_allowed(current, CPU_MASK_ALL); + set_cpus_allowed(current, all_cpus); /* As a kernel thread which was bound to a specific cpu, migrate_all_tasks wouldn't touch us. Avoid running on dying CPU. */ if (cpu_is_offline(smp_processor_id())) - migrate_to_cpu(any_online_cpu(CPU_MASK_ALL)); + migrate_to_cpu(any_online_cpu(all_cpus)); /* OK, tell user we're spawned, wait for stop or wakeup */ __set_current_state(TASK_INTERRUPTIBLE); _