[PATCH] m68k: mm: fix inappropriate pte dirty bit set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On mcf5441x, with mmc / ext4 rootfs mounted, the following warning
was observed while executing some commands as routef:

[    8.660000] ------------[ cut here ]------------
[    8.670000] WARNING: CPU: 0 PID: 35 at fs/ext4/inode.c:3643 ext4_set_page_dirty+0x54/0x108
[    8.680000] CPU: 0 PID: 35 Comm: ip Not tainted 5.10.0-rc5stmark2-001-00007-g02a1970b5d05-dirty #276
[    8.690000] Stack from 40b8fddc:
[    8.690000]         40b8fddc 4036549b 4036549b 402dc01a 4036a528 00000e3b 00000009 47f618bc
[    8.690000]         402dc078 4036a528 00000e3b 400eb5f6 00000009 00000000 00000000 8007a000
[    8.690000]         404ef419 000ff81b 8007c000 402dc46e 403628ce 40b7b534 400eb5f6 4036a528
[    8.690000]         00000e3b 00000009 00000000 47f618bc 40b8ff22 40b8a0f8 4005e09a 47f618bc
[    8.690000]         ffffffff 400097ff 402e4210 00000000 80086dbc 80086d94 40b7b534 4005e1cc
[    8.690000]         00000000 40b8ffac 40053540 00000000 00095d88 40b88800 40b88804 000ff81b
[    8.700000] Call Trace:
[    8.700000]  [<402dc01a>] __warn+0x9c/0xb8
[    8.710000]  [<402dc078>] warn_slowpath_fmt+0x42/0x62
[    8.710000]  [<400eb5f6>] ext4_set_page_dirty+0x54/0x108
[    8.720000]  [<402dc46e>] printk+0x12/0x18
[    8.720000]  [<400eb5f6>] ext4_set_page_dirty+0x54/0x108
[    8.730000]  [<4005e09a>] unmap_page_range+0x2d0/0x402
[    8.740000]  [<400097ff>] sys_waitid+0x4b/0xd4
[    8.740000]  [<402e4210>] down_read+0x0/0x30
[    8.740000]  [<4005e1cc>] unmap_single_vma+0x0/0x68
[    8.750000]  [<40053540>] page_mapping+0x0/0x7c
[    8.750000]  [<4005e2e8>] unmap_vmas+0x36/0x40
[    8.760000]  [<4006267e>] exit_mmap+0xac/0x110
[    8.760000]  [<40005dfe>] __mmput+0xe/0x68
[    8.770000]  [<4000922a>] do_exit+0x24c/0x6e8
[    8.770000]  [<4000977e>] sys_exit_group+0x0/0x14
[    8.780000]  [<40009744>] do_group_exit+0x4e/0x88
[    8.780000]  [<40009792>] __wake_up_parent+0x0/0x22
[    8.790000]  [<40004ba0>] system_call+0x54/0x96
[    8.790000]
[    8.790000] ---[ end trace b876c21409f1d404 ]---

The cause of the wanring is pte dirty bit set on unmapping, since the page
itself not marked dirty. This condition is not expected.

The PTE dirty bit shouldn't be set in a tlb miss, but it comes set on
page fault, from

mm/memory.c:wp_page_shared() and its call to fault_dirty_shared_page()

Signed-off-by: Angelo Dureghello <angelo@xxxxxxxxxxxxxxxx>
---
 arch/m68k/mm/mcfmmu.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/m68k/mm/mcfmmu.c b/arch/m68k/mm/mcfmmu.c
index eac9dde65193..19fd691774db 100644
--- a/arch/m68k/mm/mcfmmu.c
+++ b/arch/m68k/mm/mcfmmu.c
@@ -141,7 +141,6 @@ int cf_tlb_miss(struct pt_regs *regs, int write, int dtlb, int extension_word)
 			local_irq_restore(flags);
 			return -1;
 		}
-		set_pte(pte, pte_mkdirty(*pte));
 	}
 
 	set_pte(pte, pte_mkyoung(*pte));
-- 
2.30.1




[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux