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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 24 Mar 2022 09:28:59 +0100
From:   Jens Wiklander <jens.wiklander@...aro.org>
To:     Dongliang Mu <dzm91@...t.edu.cn>
Cc:     Sumit Garg <sumit.garg@...aro.org>,
        Dongliang Mu <mudongliangabcd@...il.com>,
        op-tee@...ts.trustedfirmware.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tee: optee: add missing mutext_destroy in optee_ffa_probe

On Wed, Mar 16, 2022 at 2:51 PM Dongliang Mu <dzm91@...t.edu.cn> wrote:
>
> From: Dongliang Mu <mudongliangabcd@...il.com>
>
> The error handling code of optee_ffa_probe misses the mutex_destroy of
> ffa.mutex when mutext_init succeeds.
>
> Fix this by adding mutex_destory of ffa.mutex at the error handling part
>
> Fixes: aceeafefff73 ("optee: use driver internal tee_context for some rpc")

I believe this should be
Fixes: 4615e5a34b95 ("optee: add FF-A support")
don't you agree?

Thanks,
Jens

> Signed-off-by: Dongliang Mu <mudongliangabcd@...il.com>
> ---
>  drivers/tee/optee/ffa_abi.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/tee/optee/ffa_abi.c b/drivers/tee/optee/ffa_abi.c
> index f744ab15bf2c..30a6119a2b16 100644
> --- a/drivers/tee/optee/ffa_abi.c
> +++ b/drivers/tee/optee/ffa_abi.c
> @@ -894,6 +894,7 @@ static int optee_ffa_probe(struct ffa_device *ffa_dev)
>         rhashtable_free_and_destroy(&optee->ffa.global_ids, rh_free_fn, NULL);
>         optee_supp_uninit(&optee->supp);
>         mutex_destroy(&optee->call_queue.mutex);
> +       mutex_destroy(&optee->ffa.mutex);
>  err_unreg_supp_teedev:
>         tee_device_unregister(optee->supp_teedev);
>  err_unreg_teedev:
> --
> 2.25.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ