From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Jan Kiszka <jan.kiszka@domain.hid>
Cc: Xenomai core <Xenomai-core@domain.hid>
Subject: Re: [Xenomai-core] [PULL] native: Fix msendq fastlock leakage
Date: Sun, 19 Jun 2011 12:14:02 +0200 [thread overview]
Message-ID: <4DFDCBEA.6010905@domain.hid> (raw)
In-Reply-To: <4DDA66CF.2010307@domain.hid>
On 05/23/2011 03:53 PM, Jan Kiszka wrote:
> The following changes since commit aec30a2543afa18fa7832deee85e187b0faeb1f0:
>
> xeno-test: fix reference to @XENO_TEST_DIR@ (2011-05-15 21:20:41 +0200)
>
> are available in the git repository at:
> git://git.xenomai.org/xenomai-jki.git for-upstream
>
> Jan Kiszka (1):
> native: Fix msendq fastlock leakage
>
> include/native/task.h | 5 +++++
> ksrc/skins/native/task.c | 13 ++++++-------
> 2 files changed, 11 insertions(+), 7 deletions(-)
>
> ------8<------
>
> When a native task terminates without going through rt_task_delete, we
> leaked the fastlock so far. Fix it by moving the release into the delete
> hook. As the ppd is already invalid at that point, we have to save the
> heap address in the task data structure.
I am working on this ppd cleanup issue again, I am asking for help to
find a fix in -head for all cases where the sys_ppd is needed during
some cleanup.
The problem is that when the ppd cleanup is invoked:
- we have no guarantee that current is a thread from the Xenomai
application;
- if it is, current->mm is NULL.
So, associating the sys_ppd to either current or current->mm does not
work. What we could do is pass the sys_ppd to all the other ppds cleanup
handlers, this would fix cases such as freeing mutexes fastlock, but
that does not help when the sys_ppd is needed during a thread deletion hook.
I would like to find a solution where simply calling xnsys_ppd_get()
will work, where we do not have an xnsys_ppd_get for each context, such
as for instance xnsys_ppd_get_by_mm/xnsys_ppd_get_by_task_struct,
because it would be too error-prone.
Any idea anyone?
--
Gilles.
next prev parent reply other threads:[~2011-06-19 10:14 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-23 13:53 [Xenomai-core] [PULL] native: Fix msendq fastlock leakage Jan Kiszka
2011-05-24 4:31 ` Gilles Chanteperdrix
2011-05-24 9:13 ` Jan Kiszka
2011-05-24 9:32 ` Gilles Chanteperdrix
2011-05-24 9:36 ` Jan Kiszka
2011-05-24 9:58 ` Gilles Chanteperdrix
2011-05-24 10:36 ` Jan Kiszka
2011-05-24 10:41 ` Gilles Chanteperdrix
2011-05-24 12:23 ` Jan Kiszka
2011-05-24 12:30 ` Gilles Chanteperdrix
2011-05-24 13:52 ` Jan Kiszka
2011-05-24 14:03 ` Gilles Chanteperdrix
2011-05-25 11:20 ` Jan Kiszka
2011-05-25 11:58 ` Gilles Chanteperdrix
2011-05-25 12:12 ` Jan Kiszka
2011-05-25 12:19 ` Gilles Chanteperdrix
2011-05-25 12:22 ` Jan Kiszka
2011-05-25 18:48 ` Gilles Chanteperdrix
2011-05-26 7:18 ` Jan Kiszka
2011-05-26 7:29 ` Gilles Chanteperdrix
2011-05-26 7:37 ` Jan Kiszka
2011-05-26 7:58 ` Gilles Chanteperdrix
2011-06-19 10:14 ` Gilles Chanteperdrix [this message]
2011-06-19 11:17 ` Gilles Chanteperdrix
2011-06-19 13:00 ` Gilles Chanteperdrix
2011-06-20 17:07 ` Jan Kiszka
2011-06-20 17:46 ` Gilles Chanteperdrix
2011-06-20 20:52 ` Jan Kiszka
2011-06-23 9:37 ` Jan Kiszka
2011-06-23 11:11 ` Gilles Chanteperdrix
2011-06-23 11:15 ` Jan Kiszka
2011-06-23 17:32 ` Gilles Chanteperdrix
2011-06-23 18:13 ` Philippe Gerum
2011-06-23 18:24 ` Philippe Gerum
2011-06-23 18:56 ` Gilles Chanteperdrix
2011-06-23 19:08 ` Gilles Chanteperdrix
2011-06-24 7:01 ` Gilles Chanteperdrix
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DFDCBEA.6010905@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--cc=Xenomai-core@domain.hid \
--cc=jan.kiszka@domain.hid \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.