From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Stephen Boyd <swboyd@chromium.org>
Cc: Douglas Anderson <dianders@chromium.org>,
Felipe Balbi <balbi@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Sandeep Maheswaram <quic_c_sanm@quicinc.com>,
Wesley Cheng <quic_wcheng@quicinc.com>,
robdclark@chromium.org, linux-arm-msm@vger.kernel.org,
Andy Gross <agross@kernel.org>,
Wesley Cheng <wcheng@codeaurora.org>,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH] usb: dwc3: dwc3-qcom: Avoid use-after-free when USB defers or unbinds
Date: Mon, 6 Dec 2021 18:33:28 -0800 [thread overview]
Message-ID: <Ya7H+COf/Hbk6g5M@ripper> (raw)
In-Reply-To: <CAE-0n50n=JZEqz5aQW4FQwjO9eFN56vTmBrQ6qBWduFY5jNPJA@mail.gmail.com>
On Mon 06 Dec 16:37 PST 2021, Stephen Boyd wrote:
> Quoting Douglas Anderson (2021-12-06 15:28:47)
[..]
> > + goto node_put;
> > + }
> >
> > - prop->name = "tx-fifo-resize";
> > - ret = of_add_property(dwc3_np, prop);
>
> I don't understand why we can't tell dwc3 that we want to use
> tx-fifo-resize without adding a DT property. DT isn't the only way we
> could probe this qcom dwc3 device, there's also ACPI. And in dwc3 core
> where we check for this property couldn't we add a compatible check for
> qcom,dwc3 and then force the property? I see that a lot of this was
> already discussed when these patches got applied by gregkh directly[1].
>
When the tx-fifo-resize property was introduced I made an effort to
convince the people involved about the prospect of passing this
information in the code, rather than using DT as some sort of parameter
store to pass information between the devices.
And I still would like us to come up with some sort of code-level
mechanism for passing some state between dwc3-qcom and the dwc3-core,
because I really want to register some callback with the core so that we
don't need to duplicate extcon and usb_role_switch in both the core and
platform glue.
See this discussion:
https://lore.kernel.org/linux-arm-msm/YSZCmDEedJaJyI0u@ripper/
> Can we revert out this bad code instead?
>
You definitely have my vote for that!
Regards,
Bjorn
> > - if (ret) {
> > - dev_err(dev, "unable to add property\n");
> > - goto node_put;
> > + prop->name = "tx-fifo-resize";
> > + ret = of_add_property(dwc3_np, prop);
>
> [1] https://lore.kernel.org/all/b5917fc0-c916-0a51-dc4c-315d7f02cafa@codeaurora.org/
next prev parent reply other threads:[~2021-12-07 2:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-06 23:28 [PATCH] usb: dwc3: dwc3-qcom: Avoid use-after-free when USB defers or unbinds Douglas Anderson
2021-12-07 0:02 ` Bjorn Andersson
2021-12-07 0:29 ` Matthias Kaehlcke
2021-12-07 0:37 ` Stephen Boyd
2021-12-07 0:48 ` Doug Anderson
2021-12-07 2:33 ` Bjorn Andersson [this message]
2021-12-07 17:46 ` Doug Anderson
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=Ya7H+COf/Hbk6g5M@ripper \
--to=bjorn.andersson@linaro.org \
--cc=agross@kernel.org \
--cc=balbi@kernel.org \
--cc=dianders@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=quic_c_sanm@quicinc.com \
--cc=quic_wcheng@quicinc.com \
--cc=robdclark@chromium.org \
--cc=swboyd@chromium.org \
--cc=wcheng@codeaurora.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