All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Jan Kiszka <jan.kiszka@domain.hid>
Cc: xenomai-core <xenomai@xenomai.org>
Subject: Re: [Xenomai-core] [Xenomai-git] Jan Kiszka : native: Improve fault tolerance /wrt multiple task deletions
Date: Sat, 01 May 2010 15:57:02 +0200	[thread overview]
Message-ID: <4BDC332E.2010804@domain.hid> (raw)
In-Reply-To: <E1O78nO-0008PE-EK@xenomai.org>

GIT version control wrote:
> Module: xenomai-jki
> Branch: for-upstream
> Commit: 5d2fa6c7578683e036d88bc6dbb6a7f458dfe705
> URL:    http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=5d2fa6c7578683e036d88bc6dbb6a7f458dfe705
> 
> Author: Jan Kiszka <jan.kiszka@domain.hid>
> Date:   Wed Apr 28 15:08:11 2010 +0200
> 
> native: Improve fault tolerance /wrt multiple task deletions
> 
> As we may pass the pthread handle of an RT_TASK directly to glibc, we
> may trigger a SIGSEGV if the underlying thread was already terminated.
> Try to catch this application mistakes by clearing the handle at least
> in that task descriptor which successfully ran rt_task_delete or
> rt_task_join.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@domain.hid>

Ok. I have tested this patch (though I could not find whether it was
discussed on the mailing list). And in fact, it looks to me like it
turns an application error into a silently working application. So, I
would propose:
- to use 0x8 instead of 0, to cause a segfault if an invalid handle is
used, without any risk of side effect (such as killing or joining the
wrong task if ever a pthread_t is reused)
- if Xenomai is compiled with --enable-debug, return -EINVAL, or use an
assert if such a value is encountered.


-- 
					    Gilles.


       reply	other threads:[~2010-05-01 13:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1O78nO-0008PE-EK@xenomai.org>
2010-05-01 13:57 ` Gilles Chanteperdrix [this message]
2010-05-01 14:06   ` [Xenomai-core] [Xenomai-git] Jan Kiszka : native: Improve fault tolerance /wrt multiple task deletions Jan Kiszka
2010-05-01 14:11     ` Gilles Chanteperdrix
2010-05-01 14:18       ` Jan Kiszka
2010-05-01 14:26         ` Gilles Chanteperdrix
2010-05-01 14:29           ` Jan Kiszka
2010-05-01 14:32             ` Jan Kiszka
2010-05-01 14:33             ` Gilles Chanteperdrix
2010-05-01 14:59     ` 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=4BDC332E.2010804@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=jan.kiszka@domain.hid \
    --cc=xenomai@xenomai.org \
    /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.