All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-core] Native: Fixing auto-cleanup
@ 2009-10-16 17:08 Jan Kiszka
  2009-10-16 17:14 ` Jan Kiszka
  2009-10-17 17:15 ` Philippe Gerum
  0 siblings, 2 replies; 8+ messages in thread
From: Jan Kiszka @ 2009-10-16 17:08 UTC (permalink / raw)
  To: xenomai-core

Hi,

our automatic object cleanup on process termination is "slightly" broken
for the native skin. The inline and macro magic behind
__native_*_flush_rq() blindly calls rt_*_delete(), but that's not
correct for mutexes (we can leak memory and/or corrupt the system heap),
queues and heaps (we may leak shared heaps).

I'm in the process of fixing this, but that latter two are tricky. They
need user space information (the user space address of the mapping base)
for ordinary cleanup, and this is not available otherwise.

At the time we are called with our cleanup handler, can we assume that
the dying process has already unmapped all its rtheap segments? In that
case I could simply pass NULL as base address, and the deletion will
succeed. If not, I would currently lack a good idea how to resolve this
issue.

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-10-20 10:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-16 17:08 [Xenomai-core] Native: Fixing auto-cleanup Jan Kiszka
2009-10-16 17:14 ` Jan Kiszka
2009-10-17 17:15 ` Philippe Gerum
2009-10-18 12:54   ` Jan Kiszka
2009-10-18 16:48     ` Philippe Gerum
2009-10-18 17:56       ` Jan Kiszka
2009-10-20 10:00         ` Philippe Gerum
2009-10-20 10:29           ` Jan Kiszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.