1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:28:11 +00:00

Kernel: Don't remove shbuf permission-to-reattach when releasing

The "Reference" object is not just a counter, it also represents the
permission to map a shbuf itself.

Without this change, a shbuf could not be re-mapped by the same
process after it released all of its refs on it.
This commit is contained in:
Andreas Kling 2020-06-17 17:58:40 +02:00
parent 9775e2139d
commit 720825e3bd

View file

@ -132,7 +132,6 @@ void SharedBuffer::deref_for_process(Process& process)
dbg() << "Releasing shared buffer reference on " << m_shbuf_id << " of size " << size() << " by PID " << process.pid();
#endif
process.deallocate_region(*ref.region);
m_refs.unstable_remove(i);
#ifdef SHARED_BUFFER_DEBUG
dbg() << "Released shared buffer reference on " << m_shbuf_id << " of size " << size() << " by PID " << process.pid();
#endif