Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/x86/linux-2.6-x86

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86:
  x86/xen: fix DomU boot problem
  x86: not set node to cpu_to_node if the node is not online
  x86, i387: fix ptrace leakage using init_fpu()
  • Loading branch information
Linus Torvalds committed Mar 4, 2008
2 parents 67171a3 + 87d034f commit 34f10fc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
8 changes: 4 additions & 4 deletions arch/x86/kernel/i387.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ int xfpregs_get(struct task_struct *target, const struct user_regset *regset,
if (!cpu_has_fxsr)
return -ENODEV;

unlazy_fpu(target);
init_fpu(target);

return user_regset_copyout(&pos, &count, &kbuf, &ubuf,
&target->thread.i387.fxsave, 0, -1);
Expand All @@ -147,7 +147,7 @@ int xfpregs_set(struct task_struct *target, const struct user_regset *regset,
if (!cpu_has_fxsr)
return -ENODEV;

unlazy_fpu(target);
init_fpu(target);
set_stopped_child_used_math(target);

ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
Expand Down Expand Up @@ -307,7 +307,7 @@ int fpregs_get(struct task_struct *target, const struct user_regset *regset,
if (!HAVE_HWFP)
return fpregs_soft_get(target, regset, pos, count, kbuf, ubuf);

unlazy_fpu(target);
init_fpu(target);

if (!cpu_has_fxsr)
return user_regset_copyout(&pos, &count, &kbuf, &ubuf,
Expand All @@ -332,7 +332,7 @@ int fpregs_set(struct task_struct *target, const struct user_regset *regset,
if (!HAVE_HWFP)
return fpregs_soft_set(target, regset, pos, count, kbuf, ubuf);

unlazy_fpu(target);
init_fpu(target);
set_stopped_child_used_math(target);

if (!cpu_has_fxsr)
Expand Down
8 changes: 6 additions & 2 deletions arch/x86/mm/numa_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -622,13 +622,17 @@ void __init init_cpu_to_node(void)
int i;

for (i = 0; i < NR_CPUS; i++) {
int node;
u16 apicid = x86_cpu_to_apicid_init[i];

if (apicid == BAD_APICID)
continue;
if (apicid_to_node[apicid] == NUMA_NO_NODE)
node = apicid_to_node[apicid];
if (node == NUMA_NO_NODE)
continue;
numa_set_node(i, apicid_to_node[apicid]);
if (!node_online(node))
continue;
numa_set_node(i, node);
}
}

Expand Down
3 changes: 2 additions & 1 deletion arch/x86/xen/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ char * __init xen_memory_setup(void)
unsigned long max_pfn = xen_start_info->nr_pages;

e820.nr_map = 0;
add_memory_region(0, PFN_PHYS(max_pfn), E820_RAM);
add_memory_region(0, LOWMEMSIZE(), E820_RAM);
add_memory_region(HIGH_MEMORY, PFN_PHYS(max_pfn)-HIGH_MEMORY, E820_RAM);

return "Xen";
}
Expand Down

0 comments on commit 34f10fc

Please sign in to comment.