diff options
| author | William Lee Irwin III <wli@holomorphy.com> | 2002-12-20 06:05:38 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-12-20 06:05:38 -0800 |
| commit | 8f309a3f2443fc5ec42185a247ae030195da953d (patch) | |
| tree | b075fdd177dccd85f76319ed5fe013a9455150e6 /kernel/module.c | |
| parent | c2e95c3ff2652cd5e5489b00e142f6aa225c0814 (diff) | |
[PATCH] Fix CPU bitmask truncation
Fix task->cpus_allowed bitmask truncations on 64.bit architectures.
Originally by Bjorn Helgaas for 2.4.x.
Diffstat (limited to 'kernel/module.c')
| -rw-r--r-- | kernel/module.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/module.c b/kernel/module.c index c7dfc2ea7a3d..c73b19336f1e 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -210,7 +210,7 @@ static int stopref(void *cpu) struct sched_param param = { .sched_priority = MAX_RT_PRIO-1 }; setscheduler(current->pid, SCHED_FIFO, ¶m); #endif - set_cpus_allowed(current, 1 << (unsigned long)cpu); + set_cpus_allowed(current, 1UL << (unsigned long)cpu); /* Ack: we are alive */ atomic_inc(&stopref_thread_ack); @@ -271,7 +271,7 @@ static int stop_refcounts(void) /* FIXME: racy with set_cpus_allowed. */ old_allowed = current->cpus_allowed; - set_cpus_allowed(current, 1 << (unsigned long)cpu); + set_cpus_allowed(current, 1UL << (unsigned long)cpu); atomic_set(&stopref_thread_ack, 0); stopref_num_threads = 0; |
