Re: [PATCH net-next 01/10] net: ipa: Don't error out in .remove()

From
Alex Elder <hidden>
Date
2023-11-17 19:43:24
Reply to
Uwe Kleine-König, 2023-11-17
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
Thread (23 messages) 23 messages, 7 authors, last reply 2023-11-22
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help