patch-2.2.11 linux/arch/ppc/kernel/ppc_htab.c

Next file: linux/arch/ppc/kernel/ppc_ksyms.c
Previous file: linux/arch/ppc/kernel/ppc-stub.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.10/linux/arch/ppc/kernel/ppc_htab.c linux/arch/ppc/kernel/ppc_htab.c
@@ -253,6 +253,8 @@
 		return 0;
 	if (n > strlen(buffer) - *ppos)
 		n = strlen(buffer) - *ppos;
+	if (n > count)
+		n = count;
 	copy_to_user(buf, buffer + *ppos, n);
 	*ppos += n;
 	return n;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)