From 6df6fca1ec719ff1c730be51b056977e2fda9fd0 Mon Sep 17 00:00:00 2001 From: Tao Zeng Date: Wed, 2 Jan 2019 14:47:13 +0800 Subject: [PATCH] mm: fix range mistake for virt_check [1/1] PD#SWPL-3793 Problem: Address 0xC0000000 is in lowmem, which should not be warned by virt_check:d input of virt:c0000000 ~~~~~~~~ CPU: 1 PID: 5141 Comm: Binder:3297_5 Tainted: G O 4.9.113 #1 Hardware name: Generic DT based system [] (show_stack+0x20/0x24) [] (dump_stack+0x90/0xac) [] (virt_check+0x64/0x68) [] (__check_object_size+0x184/0x1f8) [] (copy_page_to_iter+0x288/0x5b8) [] (generic_file_read_iter+0x390/0xa48) [] (__vfs_read+0xec/0x13c) [] (vfs_read+0x9c/0x164) [] (sdcardfs_read+0x28/0x50) [] (__vfs_read+0x48/0x13c) [] (vfs_read+0x9c/0x164) [] (SyS_read+0x5c/0xbc) [] (ret_fast_syscall+0x0/0x48) Solution: Not warning for 0xC0000000 if virt address is equal to it Verify: R311 Change-Id: I9a3f8efe89564f31f9a49ab4448323c93ddc761d Signed-off-by: Tao Zeng --- arch/arm/mm/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 7099113..4d3da37 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -1668,7 +1668,7 @@ EXPORT_SYMBOL(phys_check); unsigned long notrace virt_check(unsigned long x) { - if (scheduler_running && (x >= VMALLOC_START || x <= PAGE_OFFSET)) { + if (scheduler_running && (x >= VMALLOC_START || x < PAGE_OFFSET)) { pr_err("bad input of virt:%lx\n", x); dump_stack(); } -- 2.7.4