patch-2.4.10 linux/ipc/shm.c
Next file: linux/kernel/Makefile
Previous file: linux/ipc/msg.c
Back to the patch index
Back to the overall index
- Lines: 12
- Date:
Fri Sep 14 14:17:38 2001
- Orig file:
v2.4.9/linux/ipc/shm.c
- Orig date:
Sat May 19 17:47:55 2001
diff -u --recursive --new-file v2.4.9/linux/ipc/shm.c linux/ipc/shm.c
@@ -606,6 +606,11 @@
shp = shm_lock(shmid);
if(shp == NULL)
return -EINVAL;
+ err = shm_checkid(shp,shmid);
+ if (err) {
+ shm_unlock(shmid);
+ return err;
+ }
if (ipcperms(&shp->shm_perm, acc_mode)) {
shm_unlock(shmid);
return -EACCES;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)