Page MenuHomeFreeBSD

[PowerPC64] fix uma_small_free panic
ClosedPublic

Authored by alfredo on Mar 2 2020, 9:37 PM.
Referenced Files
Unknown Object (File)
Sun, Mar 9, 7:55 AM
Unknown Object (File)
Tue, Feb 18, 11:56 AM
Unknown Object (File)
Mon, Feb 17, 2:28 AM
Unknown Object (File)
Feb 8 2025, 7:38 PM
Unknown Object (File)
Jan 27 2025, 2:48 AM
Unknown Object (File)
Jan 14 2025, 7:27 PM
Unknown Object (File)
Jan 3 2025, 5:40 AM
Unknown Object (File)
Dec 26 2024, 3:32 PM
Subscribers

Details

Summary

This fixes panic like "Freeing UMA block at 0xc00000004b0ce000 with no associated page", reproduced when huge pages is not enabled and system starts using swap.

Solution provided by jhibbits.

Test Plan

Force swap usage running several buildworld threads as well with stress util on powerpc64 QEMU VM.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 29777
Build 27614: arc lint + arc unit

Event Timeline

Given what I see in uma_small_alloc(), this change really should be unnecessary (uma_small_alloc() returns an identity-mapped page), but relying on that is obviously incorrect. The pmap_kextract() in here is the correct solution.

sys/powerpc/powerpc/uma_machdep.c
97–98

I think this should be pmap_kremove() anyway, to match the pmap_kenter() above. Semantically the same, but better symmetry.

alfredo marked an inline comment as done.

replaced pmap_extract by pmap_kextract

System was running under load with latest change for almost 13 hours. Everything seems good.

This revision is now accepted and ready to land.Mar 4 2020, 3:01 PM
This revision was automatically updated to reflect the committed changes.