Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bb8416bf8b93d88e23cbbfde962ef85acda5bd5f
Commit:     bb8416bf8b93d88e23cbbfde962ef85acda5bd5f
Parent:     9d1d4cc89f3f6952978d37c29607c2d89d350767
Author:     Siddha, Suresh B <[EMAIL PROTECTED]>
AuthorDate: Tue May 8 09:22:47 2007 -0700
Committer:  Tony Luck <[EMAIL PROTECTED]>
CommitDate: Tue May 8 10:01:25 2007 -0700

    [IA64] save and restore cpus_allowed in cpu_idle_wait
    
    Save and Restore the task's cpus_allowed mask, across the set_cpus_allowed()
    in cpu_idle_wait(). Without this, we will endup corrupting task's cpu 
affinity.
    
    Signed-off-by: Suresh Siddha <[EMAIL PROTECTED]>
    Signed-off-by: Tony Luck <[EMAIL PROTECTED]>
---
 arch/ia64/kernel/process.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c
index ae96d41..cba6ac3 100644
--- a/arch/ia64/kernel/process.c
+++ b/arch/ia64/kernel/process.c
@@ -237,6 +237,7 @@ void cpu_idle_wait(void)
 {
        unsigned int cpu, this_cpu = get_cpu();
        cpumask_t map;
+       cpumask_t tmp = current->cpus_allowed;
 
        set_cpus_allowed(current, cpumask_of_cpu(this_cpu));
        put_cpu();
@@ -258,6 +259,7 @@ void cpu_idle_wait(void)
                }
                cpus_and(map, map, cpu_online_map);
        } while (!cpus_empty(map));
+       set_cpus_allowed(current, tmp);
 }
 EXPORT_SYMBOL_GPL(cpu_idle_wait);
 
-
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