[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7542e47.9ea9.196ceb7e927.Coremail.00107082@163.com>
Date: Wed, 14 May 2025 20:14:41 +0800 (CST)
From: "David Wang" <00107082@....com>
To: "Oliver Neukum" <oneukum@...e.com>
Cc: mathias.nyman@...el.com, gregkh@...uxfoundation.org,
stern@...land.harvard.edu, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] USB: core: add a memory pool to urb for
host-controller private data
At 2025-05-14 20:03:02, "Oliver Neukum" <oneukum@...e.com> wrote:
>
>
>On 14.05.25 13:51, David Wang wrote:
>
>> I am not quite sure about the concern here, do you mean somebody create a urb,
>> and then usb_init_urb() here, and never use urb_destroy to release it?
>
>Yes.
>
>>
>> That would cause memory leak if urb_destroy is not called......But is this really possible?.
>
>I think a few drivers under drivers/media do so.
That would cause real problem here.... I will keep this in mind...
(It is really a bad pattern to have only init function, it should be paired
with corresponding "release" to cancel side-effects......)
Thanks~
David
>
> Regards
> Oliver
Powered by blists - more mailing lists