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]
Message-ID: <d4a71f25-8a25-76bc-bbf7-749e20268339@ti.com>
Date:   Thu, 9 Apr 2020 09:45:14 +0300
From:   Peter Ujfalusi <peter.ujfalusi@...com>
To:     Grygorii Strashko <grygorii.strashko@...com>,
        Vinod Koul <vkoul@...nel.org>,
        Dan Williams <dan.j.williams@...el.com>,
        <dmaengine@...r.kernel.org>
CC:     Sekhar Nori <nsekhar@...com>, <linux-kernel@...r.kernel.org>,
        Vignesh Raghavendra <vigneshr@...com>,
        <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH] dmaengine: ti: k3-psil: fix deadlock on error path



On 08/04/2020 21.55, Grygorii Strashko wrote:
> The mutex_unlock() is missed on error path of psil_get_ep_config()
> which causes deadlock, so add missed mutex_unlock().

Ah, you are right, thanks for catching it!

Acked-by: Peter Ujfalusi <peter.ujfalusi@...com>

> Fixes: 8c6bb62f6b4a ("dmaengine: ti: k3 PSI-L remote endpoint configuration")
> Signed-off-by: Grygorii Strashko <grygorii.strashko@...com>
> ---
>  drivers/dma/ti/k3-psil.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/dma/ti/k3-psil.c b/drivers/dma/ti/k3-psil.c
> index d7b965049ccb..fb7c8150b0d1 100644
> --- a/drivers/dma/ti/k3-psil.c
> +++ b/drivers/dma/ti/k3-psil.c
> @@ -27,6 +27,7 @@ struct psil_endpoint_config *psil_get_ep_config(u32 thread_id)
>  			soc_ep_map = &j721e_ep_map;
>  		} else {
>  			pr_err("PSIL: No compatible machine found for map\n");
> +			mutex_unlock(&ep_map_mutex);
>  			return ERR_PTR(-ENOTSUPP);
>  		}
>  		pr_debug("%s: Using map for %s\n", __func__, soc_ep_map->name);
> 

- Péter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ