patch-2.4.18 linux/mm/shmem.c
Next file: linux/mm/swapfile.c
Previous file: linux/mm/page_alloc.c
Back to the patch index
Back to the overall index
- Lines: 12
- Date:
Mon Feb 18 19:37:41 2002
- Orig file:
linux.orig/mm/shmem.c
- Orig date:
Fri Dec 21 17:42:05 2001
diff -Naur -X /home/marcelo/lib/dontdiff linux.orig/mm/shmem.c linux/mm/shmem.c
@@ -752,6 +752,11 @@
long status;
int err;
+ if ((ssize_t) count < 0)
+ return -EINVAL;
+
+ if (!access_ok(VERIFY_READ, buf, count))
+ return -EFAULT;
down(&inode->i_sem);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)