summaryrefslogtreecommitdiffstats
path: root/arch/x86_64
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2006-02-03 21:51:47 +0100
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-04 16:43:15 -0800
commitd646bce4c77af72f5a293a96fbf14174c9f2a9c2 (patch)
treec931154a172dd17a242c455c23d21c2adf7240df /arch/x86_64
parent91522a964b295e7bccb173218cc00adadfc77bbf (diff)
downloadlinux-d646bce4c77af72f5a293a96fbf14174c9f2a9c2.tar.gz
linux-d646bce4c77af72f5a293a96fbf14174c9f2a9c2.tar.bz2
linux-d646bce4c77af72f5a293a96fbf14174c9f2a9c2.zip
[PATCH] x86_64: minor odering correction to dump_pagetable()
Checking of the validity of pointers should be consistently done before dereferencing the pointer. Signed-Off-By: Jan Beulich <jbeulich@novell.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64')
-rw-r--r--arch/x86_64/mm/fault.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86_64/mm/fault.c b/arch/x86_64/mm/fault.c
index 26eac194064b..2e7c3c8ffe03 100644
--- a/arch/x86_64/mm/fault.c
+++ b/arch/x86_64/mm/fault.c
@@ -33,7 +33,6 @@
#include <asm/proto.h>
#include <asm/kdebug.h>
#include <asm-generic/sections.h>
-#include <asm/kdebug.h>
/* Page fault error code bits */
#define PF_PROT (1<<0) /* or no page found */
@@ -157,8 +156,8 @@ void dump_pagetable(unsigned long address)
pgd = __va((unsigned long)pgd & PHYSICAL_PAGE_MASK);
pgd += pgd_index(address);
- printk("PGD %lx ", pgd_val(*pgd));
if (bad_address(pgd)) goto bad;
+ printk("PGD %lx ", pgd_val(*pgd));
if (!pgd_present(*pgd)) goto ret;
pud = __pud_offset_k((pud_t *)pgd_page(*pgd), address);