Pārlūkot izejas kodu

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.
Andreas Kling 5 gadi atpakaļ
vecāks
revīzija
720825e3bd
1 mainītis faili ar 0 papildinājumiem un 1 dzēšanām
  1. 0 1
      Kernel/SharedBuffer.cpp

+ 0 - 1
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