lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a31b4b65-66ae-416a-ae93-33ade8e9ef39@ti.com>
Date: Thu, 11 Dec 2025 16:55:50 -0600
From: Brandon Brnich <b-brnich@...com>
To: Nicolas Dufresne <nicolas.dufresne@...labora.com>, jackson.lee
	<jackson.lee@...psnmedia.com>, Nas Chung <nas.chung@...psnmedia.com>, "Mauro
 Carvalho Chehab" <mchehab@...nel.org>, "linux-media@...r.kernel.org"
	<linux-media@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
CC: Darren Etheridge <detheridge@...com>
Subject: Re: [PATCH] media: chips-media: wave5: Fix Potential Probe Resource
 Leak

Hi,

On 12/11/2025 3:51 PM, Nicolas Dufresne wrote:
> Le jeudi 11 décembre 2025 à 15:36 -0600, Brandon Brnich a écrit :
>>>>
>>>> err_irq_release:
>>>> 	if (dev->irq < 0) {
>>>> 		kthread_destroy_worker(dev->worker);
>>>> 		hrtimer_cancel(&dev->hrtimer);
>>>> 	}
>>>> err_vdi_release:
>>>
>>> That's seems more then just a suggestion, I see that err_vdi_release: is reached
>>> on worker creation failure. Checking the kthread code, this will cause a use
>>> after free instead of a leak.
>>
>> Agreed with all above statements. I will update to fix use after free
>> that I introduced in v1.
>>
>>>
>>> An additional question, aren't we are supposed to also cleanup irq_thread ? We
>>> have this code being introduced in the remove function now:
>>>
>>>
>>> 		if (dev->irq_thread) {
>>> 			kthread_stop(dev->irq_thread);
>>> 			up(&dev->irq_sem);
>>> 			dev->irq_thread = NULL;
>>> 		}
>>
>> This portion of code is being introduced in Jackson's performance
>> series. I did not base my patch on this series since it hasn't been
>> accepted yet. I assumed my patch would make it in before since this is
>> easier to review than that series. Apologies if I need to base on that
>> series. Can rebase this in v2 if requested.
>>
>> Otherwise, I suggest Jackson to add irq_thread cleanup in next iteration
>> of performance series.
> 
> I see, this is good point. I discourage writing code against my upcoming PR
> branch, its not a proper tree, but for this one you may just base you patch
> against it, since it will all be sent together ideally.
> 
> https://gitlab.freedesktop.org/linux-media/users/ndufresne/-/tree/for-6.20

Will do. Since I am rebasing on this tree I will also just handle the 
irq thread cleanup in my v2.

Best,
Brandon

> 
> regards,
> Nicolas
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ