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]
Date:   Thu, 11 Nov 2021 16:17:16 +0100
From:   Christophe JAILLET <christophe.jaillet@...adoo.fr>
To:     stanimir.varbanov@...aro.org, agross@...nel.org,
        bjorn.andersson@...aro.org, mchehab@...nel.org,
        hverkuil-cisco@...all.nl, acourbot@...omium.org
Cc:     linux-media@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] media: venus: core: Fix a resource leak in the error
 handling path of 'venus_probe()'

Le 19/08/2021 à 22:05, Christophe JAILLET a écrit :
> A successful 'of_platform_populate()' call should be balanced by a
> corresponding 'of_platform_depopulate()' call in the error handling path
> of the probe, as already done in the remove function.
> 
> A successful 'venus_firmware_init()' call should be balanced by a
> corresponding 'venus_firmware_deinit()' call in the error handling path
> of the probe, as already done in the remove function.
> 
> Update the error handling path accordingly.
> 
> Fixes: f9799fcce4bb ("media: venus: firmware: register separate platform_device for firmware loader")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> ---
>   drivers/media/platform/qcom/venus/core.c | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
> index 91b15842c555..9cb0ab7d1677 100644
> --- a/drivers/media/platform/qcom/venus/core.c
> +++ b/drivers/media/platform/qcom/venus/core.c
> @@ -349,11 +349,11 @@ static int venus_probe(struct platform_device *pdev)
>   
>   	ret = venus_firmware_init(core);
>   	if (ret)
> -		goto err_runtime_disable;
> +		goto err_of_depopulate;
>   
>   	ret = venus_boot(core);
>   	if (ret)
> -		goto err_runtime_disable;
> +		goto err_firmware_deinit;
>   
>   	ret = hfi_core_resume(core, true);
>   	if (ret)
> @@ -385,6 +385,10 @@ static int venus_probe(struct platform_device *pdev)
>   	v4l2_device_unregister(&core->v4l2_dev);
>   err_venus_shutdown:
>   	venus_shutdown(core);
> +err_firmware_deinit:
> +	venus_firmware_deinit(core);
> +err_of_depopulate:
> +	of_platform_depopulate(dev);
>   err_runtime_disable:
>   	pm_runtime_put_noidle(dev);
>   	pm_runtime_set_suspended(dev);
> 
Hi,

this was sent duing the summer holidays. Since then, a few other patches 
have been merged in linux-next for this file.

So, this is a polite reminder.

CJ

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ