Title: [7193] branches/2009R1/arch/blackfin/kernel/traps.c: Fix [#4564] on the branch - make sure we check things are valid before
Revision
7193
Author
rgetz
Date
2009-08-14 06:30:05 -0400 (Fri, 14 Aug 2009)

Log Message

Fix [#4564] on the branch - make sure we check things are valid before
we read them.

Modified Paths

Diff

Modified: branches/2009R1/arch/blackfin/kernel/traps.c (7192 => 7193)


--- branches/2009R1/arch/blackfin/kernel/traps.c	2009-08-14 03:13:02 UTC (rev 7192)
+++ branches/2009R1/arch/blackfin/kernel/traps.c	2009-08-14 10:30:05 UTC (rev 7193)
@@ -634,6 +634,10 @@
 	if (addr > (addr + 2))
 		return false;
 
+	/* check for valid memory */
+	if (!access_ok(VERIFY_READ, addr, 2) && !core_kernel_text(addr))
+		return false;
+
 	/*
 	 * Since we are in exception context, we need to do a little address checking
 	 * We need to make sure we are only accessing valid memory, and
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to