[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z36gfzNyKLuldFvE@li-008a6a4c-3549-11b2-a85c-c5cc2836eea2.ibm.com>
Date: Wed, 8 Jan 2025 16:57:51 +0100
From: Alexander Gordeev <agordeev@...ux.ibm.com>
To: Qi Zheng <zhengqi.arch@...edance.com>
Cc: peterz@...radead.org, kevin.brodsky@....com, alex@...ti.fr,
andreas@...sler.com, palmer@...belt.com, tglx@...utronix.de,
david@...hat.com, jannh@...gle.com, hughd@...gle.com,
yuzhao@...gle.com, willy@...radead.org, muchun.song@...ux.dev,
vbabka@...nel.org, lorenzo.stoakes@...cle.com,
akpm@...ux-foundation.org, rientjes@...gle.com, vishal.moola@...il.com,
arnd@...db.de, will@...nel.org, aneesh.kumar@...nel.org,
npiggin@...il.com, dave.hansen@...ux.intel.com, rppt@...nel.org,
ryan.roberts@....com, linux-mm@...ck.org,
linux-arm-kernel@...ts.infradead.org, linuxppc-dev@...ts.ozlabs.org,
linux-riscv@...ts.infradead.org, linux-s390@...r.kernel.org,
sparclinux@...r.kernel.org, linux-kernel@...r.kernel.org,
x86@...nel.org, linux-arch@...r.kernel.org, linux-csky@...r.kernel.org,
linux-hexagon@...r.kernel.org, loongarch@...ts.linux.dev,
linux-m68k@...ts.linux-m68k.org, linux-mips@...r.kernel.org,
linux-openrisc@...r.kernel.org, linux-sh@...r.kernel.org,
linux-um@...ts.infradead.org
Subject: Re: [PATCH v5 07/17] mm: pgtable: introduce pagetable_dtor()
On Wed, Jan 08, 2025 at 02:57:23PM +0800, Qi Zheng wrote:
> The pagetable_p*_dtor() are exactly the same except for the handling of
> ptlock. If we make ptlock_free() handle the case where ptdesc->ptl is
> NULL and remove VM_BUG_ON_PAGE() from pmd_ptlock_free(), we can unify
> pagetable_p*_dtor() into one function. Let's introduce pagetable_dtor()
> to do this.
>
> Later, pagetable_dtor() will be moved to tlb_remove_ptdesc(), so that
> ptlock and page table pages can be freed together (regardless of whether
> RCU is used). This prevents the use-after-free problem where the ptlock
> is freed immediately but the page table pages is freed later via RCU.
>
> Signed-off-by: Qi Zheng <zhengqi.arch@...edance.com>
> Originally-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> Reviewed-by: Kevin Brodsky <kevin.brodsky@....com>
> ---
...
> arch/s390/include/asm/pgalloc.h | 6 +--
> arch/s390/include/asm/tlb.h | 6 +--
> arch/s390/mm/pgalloc.c | 2 +-
...
> include/asm-generic/pgalloc.h | 8 ++--
> include/linux/mm.h | 52 ++++------------------
> mm/memory.c | 3 +-
> 28 files changed, 62 insertions(+), 95 deletions(-)
...
For s390:
Acked-by: Alexander Gordeev <agordeev@...ux.ibm.com>
Thanks!
Powered by blists - more mailing lists