Explorar o código

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 %!s(int64=5) %!d(string=hai) anos
pai
achega
720825e3bd
Modificáronse 1 ficheiros con 0 adicións e 1 borrados
  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();
                 dbg() << "Releasing shared buffer reference on " << m_shbuf_id << " of size " << size() << " by PID " << process.pid();
 #endif
 #endif
                 process.deallocate_region(*ref.region);
                 process.deallocate_region(*ref.region);
-                m_refs.unstable_remove(i);
 #ifdef SHARED_BUFFER_DEBUG
 #ifdef SHARED_BUFFER_DEBUG
                 dbg() << "Released shared buffer reference on " << m_shbuf_id << " of size " << size() << " by PID " << process.pid();
                 dbg() << "Released shared buffer reference on " << m_shbuf_id << " of size " << size() << " by PID " << process.pid();
 #endif
 #endif