Kernel: Preserve internal state in cloned PurgeableVMObjects

When cloning a purgeable memory region (which happens on fork),
we need to preserve the "was purged" and "volatile" state of the
original region, or they will always appear as non-volatile and
unpurged regions in the child process.

Fixes #3374.
This commit is contained in:
Andreas Kling 2020-09-01 17:42:30 +02:00
parent a56360f787
commit 171868e4f7
Notes: sideshowbarker 2024-07-19 02:56:25 +09:00

View file

@ -42,6 +42,8 @@ PurgeableVMObject::PurgeableVMObject(size_t size)
PurgeableVMObject::PurgeableVMObject(const PurgeableVMObject& other) PurgeableVMObject::PurgeableVMObject(const PurgeableVMObject& other)
: AnonymousVMObject(other) : AnonymousVMObject(other)
, m_was_purged(other.m_was_purged)
, m_volatile(other.m_volatile)
{ {
} }