[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Ya7H+COf/Hbk6g5M@ripper>
Date: Mon, 6 Dec 2021 18:33:28 -0800
From: Bjorn Andersson <bjorn.andersson@...aro.org>
To: Stephen Boyd <swboyd@...omium.org>
Cc: Douglas Anderson <dianders@...omium.org>,
Felipe Balbi <balbi@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Sandeep Maheswaram <quic_c_sanm@...cinc.com>,
Wesley Cheng <quic_wcheng@...cinc.com>, robdclark@...omium.org,
linux-arm-msm@...r.kernel.org, Andy Gross <agross@...nel.org>,
Wesley Cheng <wcheng@...eaurora.org>,
linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org
Subject: Re: [PATCH] usb: dwc3: dwc3-qcom: Avoid use-after-free when USB
defers or unbinds
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/
Powered by blists - more mailing lists