Magellan Linux

Annotation of /trunk/kernel26-xen/patches-2.6.25-r1/1032-2.6.25-xen-silent-stack-overflow.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 609 - (hide annotations) (download)
Fri May 23 17:35:37 2008 UTC (16 years ago) by niro
File size: 955 byte(s)
-using opensuse xen patchset, updated kernel configs

1 niro 609 diff -Naur linux-2.6.25/arch/x86/mm/fault-xen.c linux-2.6.25-xen/arch/x86/mm/fault-xen.c
2     --- linux-2.6.25/arch/x86/mm/fault-xen.c 2008-05-23 18:52:12.000000000 +0200
3     +++ linux-2.6.25-xen/arch/x86/mm/fault-xen.c 2008-05-23 18:47:29.000000000 +0200
4     @@ -590,7 +590,7 @@
5     {
6     struct task_struct *tsk;
7     struct mm_struct *mm;
8     - struct vm_area_struct *vma;
9     + struct vm_area_struct * vma, * prev_vma;
10     unsigned long address;
11     int write, si_code;
12     int fault;
13     @@ -738,7 +738,13 @@
14     if (address + 65536 + 32 * sizeof(unsigned long) < regs->sp)
15     goto bad_area;
16     }
17     - if (expand_stack(vma, address))
18     + /*
19     + * find_vma_prev is just a bit slower, because it cannot
20     + * use the mmap_cache, so we run it only in the growsdown
21     + * slow path and we leave find_vma in the fast path.
22     + */
23     + find_vma_prev(current->mm, address, &prev_vma);
24     + if (expand_stack(vma, address, prev_vma))
25     goto bad_area;
26     /*
27     * Ok, we have a good vm_area for this memory access, so