Re: [PATCH v6 26/38] sparc64: Implement the new page table range API

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

 



On 9/4/23 10:43, Mike Rapoport wrote:
On Mon, Sep 04, 2023 at 08:36:44AM -0700, Guenter Roeck wrote:
Hi,

On Wed, Aug 02, 2023 at 04:13:54PM +0100, Matthew Wilcox (Oracle) wrote:
Add set_ptes(), update_mmu_cache_range(), flush_dcache_folio() and
flush_icache_pages().  Convert the PG_dcache_dirty flag from being
per-page to per-folio.

Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>
Acked-by: Mike Rapoport (IBM) <rppt@xxxxxxxxxx>
Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>
Cc: sparclinux@xxxxxxxxxxxxxxx

This patch causes all my sparc64 qemu boot tests to crash.

[    4.890744] Unable to handle kernel NULL pointer dereference
[    4.891273] tsk->{mm,active_mm}->context = 0000000000000001
[    4.891475] tsk->{mm,active_mm}->pgd = fffff80005452000
[    4.891660]               \|/ ____ \|/
[    4.891660]               "@'/ .. \`@"
[    4.891660]               /_| \__/ |_\
[    4.891660]                  \__U_/
[    4.892116] modprobe(45): Oops [#1]
[    4.892555] CPU: 0 PID: 45 Comm: modprobe Tainted: G                 N 6.5.0+ #1
[    4.892949] TSTATE: 0000004411001601 TPC: 00000000004565d8 TNPC: 00000000004565dc Y: 00000008    Tainted: G                 N

...

[    4.901535] note: modprobe[45] exited with preempt_count 2

This should fix it:

From 8181d1f582a309b51fe4cb02a783628257b91c86 Mon Sep 17 00:00:00 2001
From: "Mike Rapoport (IBM)" <rppt@xxxxxxxxxx>
Date: Mon, 4 Sep 2023 20:37:59 +0300
Subject: [PATCH] sparc64: add missing initialization of folio in
  tlb_batch_add()

Commit 1a10a44dfc1d ("sparc64: implement the new page table range API")
missed initialization of folio variable in tlb_batch_add() which causes
boot tests to crash.

Add missing initialization.

Reported-by: Guenter Roeck <linux@xxxxxxxxxxxx>
Fixes: 1a10a44dfc1d ("sparc64: implement the new page table range API")
Signed-off-by: Mike Rapoport (IBM) <rppt@xxxxxxxxxx>

Yes, it does.

Tested-by: Guenter Roeck <linux@xxxxxxxxxxxx>

Thanks,
Guenter

---
  arch/sparc/mm/tlb.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/arch/sparc/mm/tlb.c b/arch/sparc/mm/tlb.c
index 0d41c94ec3ac..b44d79d778c7 100644
--- a/arch/sparc/mm/tlb.c
+++ b/arch/sparc/mm/tlb.c
@@ -128,6 +128,7 @@ void tlb_batch_add(struct mm_struct *mm, unsigned long vaddr,
  			goto no_cache_flush;
/* A real file page? */
+		folio = page_folio(page);
  		mapping = folio_flush_mapping(folio);
  		if (!mapping)
  			goto no_cache_flush;




[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux