Skip to content

Backport #78 to 6.18-lts: x86/xen: clear the user pgd pointer when freeing it - #82

Open
edera-rebase-app[bot] wants to merge 1 commit into
edera/6.18-ltsfrom
backport/edera-6.18-lts/pr-78
Open

edera-rebase-app[bot] wants to merge 1 commit into
edera/6.18-ltsfrom
backport/edera-6.18-lts/pr-78

Conversation

@edera-rebase-app

Copy link
Copy Markdown

Backport of #78 from edera/mainline to edera/6.18-lts (8a4c2881a70c), prepared by Claude. Run log.

Merge with Rebase and merge, so edera/6.18-lts stays linear.

Independent checks

Builds: success (x86_64 and arm64 vmlinux with the Edera features built in).

LTS tip before 8a4c2881a70c
LTS tip after 15afa12d457d
Commits requested 1
  • New branch fast-forwards the LTS tip.
  • Backported commits are linear.
  • All 1 requested commits backported in order, each with its source's subject and identical +/- lines.

Claude's report

Claude left no report (backport step: success).

Waiting for the x86_64 build.

xen_pgd_alloc() keeps the user pgd of a 64-bit PV mm in page->private of
the kernel pgd page, and xen_pgd_free() frees it without clearing the
pointer. page->private shares its slot with ptdesc->ptl, so when split
ptlocks are allocated separately (lock debugging, PREEMPT_RT),
pagetable_dtor() hands the freed user pgd to kmem_cache_free() as a
ptlock. With SLUB consistency checks this warns "virt_to_cache: Object is
not a Slab page!" on every mm teardown; without them it corrupts the slab.

Clear page->private once the user pgd is freed.

Signed-off-by: Kavi <kavi@edera.dev>
(cherry picked from commit 7ac792d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant