aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ipc/shm.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/ipc/shm.c b/ipc/shm.c
index 7fc9f9f3a26b..01454796ba3c 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -1172,13 +1172,6 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr,
1172 1172
1173 if (find_vma_intersection(current->mm, addr, addr + size)) 1173 if (find_vma_intersection(current->mm, addr, addr + size))
1174 goto invalid; 1174 goto invalid;
1175 /*
1176 * If shm segment goes below stack, make sure there is some
1177 * space left for the stack to grow (at least 4 pages).
1178 */
1179 if (addr < current->mm->start_stack &&
1180 addr > current->mm->start_stack - size - PAGE_SIZE * 5)
1181 goto invalid;
1182 } 1175 }
1183 1176
1184 addr = do_mmap_pgoff(file, addr, size, prot, flags, 0, &populate); 1177 addr = do_mmap_pgoff(file, addr, size, prot, flags, 0, &populate);