From: Chris Lew <clew@codeaurora.org>
To: Stephen Boyd <swboyd@chromium.org>,
bjorn.andersson@linaro.org, ohad@wizery.com
Cc: aneela@codeaurora.org, linux-arm-msm@vger.kernel.org,
linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rpmsg: glink: Remove channel decouple from rpdev release
Date: Fri, 11 Oct 2019 11:43:23 -0700 [thread overview]
Message-ID: <4e0b199c-40d7-4222-f333-601134a817a1@codeaurora.org> (raw)
In-Reply-To: <5d9ebbc4.1c69fb81.b45e2.25ce@mx.google.com>
On 10/9/2019 10:04 PM, Stephen Boyd wrote:
> Quoting Chris Lew (2019-10-08 18:33:45)
>> If a channel is being rapidly restarted and the kobj release worker is
>> busy, there is a chance the the rpdev_release function will run after
>> the channel struct itself has been released.
>>
>> There should not be a need to decouple the channel from rpdev in the
>> rpdev release since that should only happen from the channel close
>> commands.
>>
>> Signed-off-by: Chris Lew <clew@codeaurora.org>
>
> Fixes tag? The whole thing sounds broken and probably is still racy in
> the face of SMP given that channel->rpdev is tested for "published" or
> not. Can you describe the race that you're closing more?
>
Thanks Stephen, will add Fixes tag and try to describe the race better.
I agree that the whole thing sounds broken, the glink channel cleanup
code has a couple bugs that need to be addressed in a more extensive
patch. This patch is more to address the immediate issue of a
use-after-free from one of the races.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
prev parent reply other threads:[~2019-10-11 18:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-09 1:33 [PATCH] rpmsg: glink: Remove channel decouple from rpdev release Chris Lew
2019-10-10 5:04 ` Stephen Boyd
2019-10-11 18:43 ` Chris Lew [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=4e0b199c-40d7-4222-f333-601134a817a1@codeaurora.org \
--to=clew@codeaurora.org \
--cc=aneela@codeaurora.org \
--cc=bjorn.andersson@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=ohad@wizery.com \
--cc=swboyd@chromium.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 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).