On 11/17/23 8:45 AM, Uwe Kleine-König wrote:
quoted
quoted
Fixes: cdf2e9419dd9 ("soc: qcom: ipa: main code")
Is this really a bug fix? This code was doing the right
thing even if the caller was not.
Yes, since cdf2e9419dd9 the driver is leaking resources if
ipa_modem_stop() fails. I call that a bug.
I understand that. But the alternative is that we free
those resources and allow the hardware to (eventually)
complete an in-flight operation that touches one of those
resources, which is a use-after-free (rather than a leak),
and I call that a bug too.
The function was returning an error to the caller to
indicate the request failed. I'm comfortable with
accepting that and just issuing a warning and returning
no error.
The reason I wanted more time to review was that I want to
walk through that code path again and decide which of the
bugs I'd rather keep--and I think it would be the resource
leak.
It's also possible the cleanup function can preclude any
later completion from causing a problem, which would be
the best. I just don't remember without looking at it
again closely.
-Alex