OpenVZ Forum


Home » Mailing lists » Devel » [IPC]: Logical refcount loop in ipc ns -> massive leakage
Re: [IPC]: Logical refcount loop in ipc ns -> massive leakage [message #17441 is a reply to message #17438] Mon, 05 February 2007 10:14 Go to previous messageGo to previous message
Alexey Kuznetsov is currently offline  Alexey Kuznetsov
Messages: 18
Registered: February 2006
Junior Member
Hello!

> The struct file that is used appears impossible for user space 
> to get at directly.  Therefore I believe we can instead increment
> and decrement the namespace count at the same places we increment
> and decrement shm_nattach.  Ideally we would only increment the
> namespace count when shm_nattach goes from 0 to 1 and we would
> only decrement the namespace count when shm_nattach goes from 1 to 0.
> 
> Does that make sense?

Yes, this would save the day.

Indeed, shm_file_ns() is required only when the segment is already mapped,
except for shm_mmap() and even there shm_nattch is incremented before
do_mmap() is used. It will work.

Possibility to use this file directly will be lost. It is a little unpleasant;
openvz checkpointing used it to restore sysv shm mappings like another file
mappings, it was nice, but this code can be a little uglified to treat
those mapping specially. No harm either.

Alexey
_______________________________________________
Containers mailing list
Containers@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [RFC][PATCH] pidspace in coda fs
Next Topic: [PATCH] shm: Make sysv ipc shared memory use stacked files.
Goto Forum:
  


Current Time: Fri Aug 15 07:14:26 GMT 2025

Total time taken to generate the page: 0.54811 seconds