All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Xenomai-core@domain.hid
Subject: Re: [Xenomai-core] Racy pse51_mutex_check_init?
Date: Sat, 23 Aug 2008 12:34:22 +0200	[thread overview]
Message-ID: <48AFE7AE.4000804@domain.hid> (raw)
In-Reply-To: <48AFE498.2060805@domain.hid>

Gilles Chanteperdrix wrote:
> Hi Jan,
> 
> Please do not use my address at gmail, gna does not want me to post from
> this address:
> 
> 2008-08-23 12:10:19 1KWq4T-0000zD-9E ** xenomai@xenomai.org <Xenomai-core@domain.hid
>> R=dnslookup T=remote_smtp: SMTP error from remote mailer after RCPT TO:<Xenomai-
> core@domain.hid>: host mail.gna.org [88.191.250.46]: 550 rejected because gmail.com i
> s in a black list at dsn.rfc-ignorant.org
> 
> so, here is a repost of my answer:
> 
> Jan Kiszka wrote:
>>> Hi Gilles,
>>>
>>> trying to understand the cb_read/write lock usage, some question came up
>>> here: What prevents that the mutexq iteration in pse51_mutex_check_init
>>> races against pse51_mutex_destroy_internal?
> 
> Well, I am afraid the mechanism used is not 100% safe. Anyway, the aim
> is to catch most of invalid usages, it seems we can not catch them all.

No, it works, because pthread_mutex_destroy will not be able to get the
write lock is the lock is read-locked.

-- 
					    Gilles.


  reply	other threads:[~2008-08-23 10:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-23  8:33 [Xenomai-core] Racy pse51_mutex_check_init? Jan Kiszka
2008-08-23 10:21 ` Gilles Chanteperdrix
2008-08-23 10:34   ` Gilles Chanteperdrix [this message]
2008-08-23 10:53   ` Philippe Gerum
2008-08-23 11:07     ` Gilles Chanteperdrix
2008-08-23 11:13       ` Philippe Gerum
2008-08-23 11:16       ` Philippe Gerum
2008-08-23 11:31         ` Gilles Chanteperdrix
2008-08-23 11:31       ` Jan Kiszka
2008-08-23 11:33         ` Gilles Chanteperdrix
2008-08-23 10:43 ` Gilles Chanteperdrix
2008-08-23 10:51   ` Jan Kiszka
2008-08-23 10:58     ` Gilles Chanteperdrix
2008-08-23 11:02       ` Gilles Chanteperdrix
2008-08-23 11:06         ` Jan Kiszka
2008-08-23 11:24           ` 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=48AFE7AE.4000804@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=Xenomai-core@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.