diff options
author | Andreas Kling <kling@serenityos.org> | 2020-06-17 17:58:40 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-06-17 18:43:50 +0200 |
commit | 720825e3bd7638dfdf81ec70b2081ccd2b7ba900 (patch) | |
tree | 062e89564330a9d9afaf8f78ddc96c9121ac30ca /Kernel | |
parent | 9775e2139dd48d81659be631e1ee8bb9c1ca7ce4 (diff) | |
download | serenity-720825e3bd7638dfdf81ec70b2081ccd2b7ba900.zip |
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.
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/SharedBuffer.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/Kernel/SharedBuffer.cpp b/Kernel/SharedBuffer.cpp index 838094355d..9ac656e4f0 100644 --- a/Kernel/SharedBuffer.cpp +++ b/Kernel/SharedBuffer.cpp @@ -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 |