Kernel: Make Process a Weakable class.

Use this to fix a use-after-free in ~GraphicsBitmap(). We'd hit this when
the WindowServer was doing a deferred destruction of a WSWindow whose
backing store referred to a now-reaped Process.
This commit is contained in:
Andreas Kling 2019-01-31 07:02:40 +01:00
commit 2dc9c86bad
Notes: sideshowbarker 2024-07-19 15:54:33 +09:00
3 changed files with 5 additions and 4 deletions

View file

@ -43,7 +43,7 @@ private:
size_t m_pitch { 0 };
#ifdef KERNEL
Process* m_client_process { nullptr };
WeakPtr<Process> m_client_process;
Region* m_client_region { nullptr };
Region* m_server_region { nullptr };
#endif