diff options
author | T Makphaibulchoke <tmac@hp.com> | 2012-08-28 21:21:43 -0600 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-09-13 17:35:54 +0200 |
commit | 73e8f3d7e2cb23614d5115703d76d8e54764b641 (patch) | |
tree | c7edef261d3ea49550801297a98b5890493252e1 /arch/x86/mm | |
parent | 4454d32749465ffa77d82bc1fdd196d6dedc544b (diff) | |
download | linux-3.10-73e8f3d7e2cb23614d5115703d76d8e54764b641.tar.gz linux-3.10-73e8f3d7e2cb23614d5115703d76d8e54764b641.tar.bz2 linux-3.10-73e8f3d7e2cb23614d5115703d76d8e54764b641.zip |
x86/mm/init.c: Fix devmem_is_allowed() off by one
Fixing an off-by-one error in devmem_is_allowed(), which allows
accesses to physical addresses 0x100000-0x100fff, an extra page
past 1MB.
Signed-off-by: T Makphaibulchoke <tmac@hp.com>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Cc: yinghai@kernel.org
Cc: tiwai@suse.de
Cc: dhowells@redhat.com
Link: http://lkml.kernel.org/r/1346210503-14276-1-git-send-email-tmac@hp.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/mm')
-rw-r--r-- | arch/x86/mm/init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c index e0e6990723e..ab1f6a93b52 100644 --- a/arch/x86/mm/init.c +++ b/arch/x86/mm/init.c @@ -319,7 +319,7 @@ unsigned long __init_refok init_memory_mapping(unsigned long start, */ int devmem_is_allowed(unsigned long pagenr) { - if (pagenr <= 256) + if (pagenr < 256) return 1; if (iomem_is_exclusive(pagenr << PAGE_SHIFT)) return 0; |