From: Philippe Gerum <rpm@xenomai.org>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: Jan Kiszka <jan.kiszka@domain.hid>, Xenomai-core@domain.hid
Subject: Re: [Xenomai-core] [2.4.x PATCH] POSIX: Remove mutex/cond_init locking, fix NULL attribute
Date: Fri, 25 Apr 2008 16:00:12 +0200 [thread overview]
Message-ID: <4811E3EC.80504@domain.hid> (raw)
In-Reply-To: <2ff1a98a0804250646j42be0c69q76ca2a4bde382dba@domain.hid>
Gilles Chanteperdrix wrote:
> On Fri, Apr 25, 2008 at 3:44 PM, Jan Kiszka <jan.kiszka@domain.hid> wrote:
>> Gilles Chanteperdrix wrote:
>> > On Fri, Apr 25, 2008 at 2:59 PM, Jan Kiszka <jan.kiszka@domain.hid> wrote:
>> >> Hi,
>> >>
>> >> trunk check-in #3369 did not just remove some "questionable critical
>> >> sections", it also happen to fix two ugly bugs in the POSIX skin: The
>> >> user was not able to pass NULL attributes down to mutex_init and
>> >> cond_init. Find a backport of that patch for 2.4.x attached.
>> >
>> > I am using pthread_mutex_init and pthread_cond_init from user-space
>> > with NULL attributes with pre 2.4 versions all the time, and never had
>> > any problem.
>>
>> Maybe a x86-64 issue: __xn_access_ok() triggers here when you stuff in a
>> NULL pointer.
>
> Ok. I had a look at the code now, and understood your patch. We simply
> have been lucky until now that xn_access_ok did not fail with NULL
> pointers.
>
Unlike other ports, x86_64 specifically tests for page zero pointers...
#define __xn_access_ok(task,type,addr,size) ((unsigned long)(addr) >=
PAGE_SIZE && \
__xn_range_ok(task, addr, size))
--
Philippe.
prev parent reply other threads:[~2008-04-25 14:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-25 12:59 [Xenomai-core] [2.4.x PATCH] POSIX: Remove mutex/cond_init locking, fix NULL attribute Jan Kiszka
2008-04-25 13:12 ` Gilles Chanteperdrix
2008-04-25 13:44 ` Jan Kiszka
2008-04-25 13:46 ` Gilles Chanteperdrix
2008-04-25 14:00 ` Philippe Gerum [this message]
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=4811E3EC.80504@domain.hid \
--to=rpm@xenomai.org \
--cc=Xenomai-core@domain.hid \
--cc=gilles.chanteperdrix@xenomai.org \
--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.