patch-1.3.92 linux/fs/super.c

Next file: linux/include/asm-alpha/bitops.h
Previous file: linux/fs/nfs/nfsroot.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.91/linux/fs/super.c linux/fs/super.c
@@ -796,6 +796,8 @@
 	vma = find_vma(current, (unsigned long) data);
 	if (!vma || (unsigned long) data < vma->vm_start)
 		return -EFAULT;
+	if (!(vma->vm_flags & VM_READ))
+		return -EFAULT;
 	i = vma->vm_end - (unsigned long) data;
 	if (PAGE_SIZE <= (unsigned long) i)
 		i = PAGE_SIZE-1;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this