Re: [PATCH] usb: gadget: net2280: fix memory leak on probe error handling paths

From: Alan Stern
Date: Wed Jul 22 2020 - 21:00:58 EST


On Wed, Jul 22, 2020 at 10:56:09PM +0300, Evgeny Novikov wrote:
> Hi Alan,
>
> I have neither an appropriate hardware nor an experience to deal with
> issues that you mentioned. Our framework does not allow to detect them
> as well at the moment. At last, it seems that rather many drivers can
> suffer from these issues. So, it would be much better if somebody else
> will suggest necessary fixes and test them carefully.

Heh... Working from home, I no longer have access to the appropriate
hardware either. But at least I do have the necessary experience. :-)

> BTW, you have already discussed the race within net2280_remove() with
> my colleague about 3 years ago. But you did not achieve a consensus at
> that time and no fixes were made after all.

I don't recall that. Do you have a pointer to the email thread in the
archives?

> Anyway, one can consider both issues independently on the one fixed by
> the patch.

Yes. I'll write and submit a series of patches.

Alan Stern