patch-2.0.34 linux/ipc/shm.c
Next file: linux/kernel/exit.c
Previous file: linux/init/main.c
Back to the patch index
Back to the overall index
- Lines: 13
- Date:
Wed Jun 3 15:17:50 1998
- Orig file:
v2.0.33/linux/ipc/shm.c
- Orig date:
Mon Aug 4 15:25:11 1997
diff -u --recursive --new-file v2.0.33/linux/ipc/shm.c linux/ipc/shm.c
@@ -494,10 +494,10 @@
return -EINVAL;
}
/*
- * Check if addr exceeds TASK_SIZE (from do_mmap)
+ * Check if addr exceeds MAX_USER_ADDR (from do_mmap)
*/
len = PAGE_SIZE*shp->shm_npages;
- if (addr >= TASK_SIZE || len > TASK_SIZE || addr > TASK_SIZE - len)
+ if (addr >= MAX_USER_ADDR || len > MAX_USER_ADDR || addr > MAX_USER_ADDR - len)
return -EINVAL;
/*
* If shm segment goes below stack, make sure there is some
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov