]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/patches/suse-2.6.27.31/patches.suse/silent-stack-overflow-2.patch
Add a patch to fix Intel E100 wake-on-lan problems.
[ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.suse / silent-stack-overflow-2.patch
index 6bb97097165567ef6c90d962cfd491dc053aa7fe..7683737557e18f13b8c18db5fcea92a745a04374 100644 (file)
@@ -300,7 +300,7 @@ Signed-off-by: Nick Piggin <npiggin@suse.de>
  bottomup:
 --- a/include/linux/mm.h
 +++ b/include/linux/mm.h
-@@ -1182,6 +1182,7 @@ void page_cache_async_readahead(struct a
+@@ -1194,6 +1194,7 @@ void page_cache_async_readahead(struct a
  unsigned long max_sane_readahead(unsigned long nr);
  
  /* Do stack extension */
@@ -310,7 +310,7 @@ Signed-off-by: Nick Piggin <npiggin@suse.de>
  extern int expand_upwards(struct vm_area_struct *vma, unsigned long address);
 --- a/kernel/sysctl.c
 +++ b/kernel/sysctl.c
-@@ -1209,6 +1209,14 @@ static struct ctl_table vm_table[] = {
+@@ -1207,6 +1207,14 @@ static struct ctl_table vm_table[] = {
                .extra2         = &one,
        },
  #endif
@@ -333,9 +333,9 @@ Signed-off-by: Nick Piggin <npiggin@suse.de>
  atomic_long_t vm_committed_space = ATOMIC_LONG_INIT(0);
 +int heap_stack_gap __read_mostly = 1;
  
- /*
-  * Check that a process has enough memory to allocate a new virtual
-@@ -1290,6 +1291,8 @@ arch_get_unmapped_area(struct file *filp
+ /* amount of vm to protect from userspace access */
+ unsigned long mmap_min_addr = CONFIG_DEFAULT_MMAP_MIN_ADDR;
+@@ -1293,6 +1294,8 @@ arch_get_unmapped_area(struct file *filp
  
  full_search:
        for (vma = find_vma(mm, addr); ; vma = vma->vm_next) {
@@ -344,7 +344,7 @@ Signed-off-by: Nick Piggin <npiggin@suse.de>
                /* At this point:  (!vma || addr < vma->vm_end). */
                if (TASK_SIZE - len < addr) {
                        /*
-@@ -1304,15 +1307,23 @@ full_search:
+@@ -1307,15 +1310,23 @@ full_search:
                        }
                        return -ENOMEM;
                }
@@ -371,7 +371,7 @@ Signed-off-by: Nick Piggin <npiggin@suse.de>
                addr = vma->vm_end;
        }
  }
-@@ -1370,34 +1381,51 @@ arch_get_unmapped_area_topdown(struct fi
+@@ -1373,34 +1384,51 @@ arch_get_unmapped_area_topdown(struct fi
  
        /* make sure it can fit in the remaining address space */
        if (addr > len) {
@@ -433,7 +433,7 @@ Signed-off-by: Nick Piggin <npiggin@suse.de>
        } while (len < vma->vm_start);
  
  bottomup:
-@@ -1620,6 +1648,19 @@ int expand_upwards(struct vm_area_struct
+@@ -1623,6 +1651,19 @@ int expand_upwards(struct vm_area_struct
        /* Somebody else might have raced and expanded it already */
        if (address > vma->vm_end) {
                unsigned long size, grow;
@@ -453,7 +453,7 @@ Signed-off-by: Nick Piggin <npiggin@suse.de>
  
                size = address - vma->vm_start;
                grow = (address - vma->vm_end) >> PAGE_SHIFT;
-@@ -1628,6 +1669,7 @@ int expand_upwards(struct vm_area_struct
+@@ -1631,6 +1672,7 @@ int expand_upwards(struct vm_area_struct
                if (!error)
                        vma->vm_end = address;
        }
@@ -461,7 +461,7 @@ Signed-off-by: Nick Piggin <npiggin@suse.de>
        anon_vma_unlock(vma);
        return error;
  }
-@@ -1664,7 +1706,21 @@ static inline int expand_downwards(struc
+@@ -1667,7 +1709,21 @@ static inline int expand_downwards(struc
        /* Somebody else might have raced and expanded it already */
        if (address < vma->vm_start) {
                unsigned long size, grow;
@@ -483,7 +483,7 @@ Signed-off-by: Nick Piggin <npiggin@suse.de>
                size = vma->vm_end - address;
                grow = (vma->vm_start - address) >> PAGE_SHIFT;
  
-@@ -1674,6 +1730,7 @@ static inline int expand_downwards(struc
+@@ -1677,6 +1733,7 @@ static inline int expand_downwards(struc
                        vma->vm_pgoff -= grow;
                }
        }