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

From: Mike Rapoport
Date: Mon Sep 04 2023 - 13:44:57 EST


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: