patch-2.4.27 linux-2.4.27/arch/mips/sibyte/sb1250/bcm1250_tbprof.c

Next file: linux-2.4.27/arch/ppc/boot/simple/m8260_tty.c
Previous file: linux-2.4.27/arch/m68k/mac/iop.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.26/arch/mips/sibyte/sb1250/bcm1250_tbprof.c linux-2.4.27/arch/mips/sibyte/sb1250/bcm1250_tbprof.c
@@ -300,6 +300,9 @@
 	char *dest    =	 buf;
 	long  cur_off = *offp;
 
+	if (cur_off < 0)
+		return -EINVAL;
+
 	count = 0;
 	cur_sample = cur_off / TB_SAMPLE_SIZE;
 	sample_off = cur_off % TB_SAMPLE_SIZE;

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