From: "zhaohang (F)" <zhaohang14@huawei.com>
To: "musl@lists.openwall.com" <musl@lists.openwall.com>
Subject: 答复: [musl] Re: 答复: [musl] Subject: [PATCH] pthread: Fix bug that pthread_create may cause priority inversion
Date: Mon, 16 Sep 2019 02:27:29 +0000 [thread overview]
Message-ID: <59FB1E003EF3A943BD6BAD197ABD4D6A2B82EA@dggemi524-mbx.china.huawei.com> (raw)
In-Reply-To: <20190911172919.GZ9017@brightrain.aerifal.cx>
Thanks for your reply
-----邮件原件-----
发件人: Rich Felker [mailto:dalias@aerifal.cx] 代表 Rich Felker
发送时间: 2019年9月12日 1:29
收件人: musl@lists.openwall.com
主题: Re: [musl] Re: 答复: [musl] Subject: [PATCH] pthread: Fix bug that pthread_create may cause priority inversion
On Wed, Sep 11, 2019 at 09:52:00AM -0400, Rich Felker wrote:
> On Wed, Sep 11, 2019 at 01:38:38PM +0000, zhaohang (F) wrote:
> > Thank you Rich for your patch. It helps me a lot.
> >
> > But I find that 'return 0' is used to let child thread exit. In that
> > case, a bad thing will happen that the return address of child
> > thread maybe undefined, if caller set prio of child unsuccessfully.
>
> The code in __clone is supposed to perform SYS_exit if the start
> function returns; this actually matters for users of the public
> clone() function, I think.
I found the problem -- when clone.s is built as thumb, mov lr,pc is invalid for saving the return address (it omits the thumb-mode bit).
I have a patch I'll push soon, attached. Thanks again for the report!
Rich
prev parent reply other threads:[~2019-09-16 2:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-09 13:57 zhaohang (F)
2019-09-09 14:01 ` 答复: " zhaohang (F)
2019-09-09 14:54 ` Szabolcs Nagy
2019-09-09 17:49 ` Rich Felker
2019-09-11 13:38 ` 答复: [musl] " zhaohang (F)
2019-09-11 13:52 ` Rich Felker
2019-09-11 17:29 ` Rich Felker
2019-09-16 2:27 ` zhaohang (F) [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=59FB1E003EF3A943BD6BAD197ABD4D6A2B82EA@dggemi524-mbx.china.huawei.com \
--to=zhaohang14@huawei.com \
--cc=musl@lists.openwall.com \
/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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).