Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp789809ybj; Thu, 7 May 2020 07:42:24 -0700 (PDT) X-Google-Smtp-Source: APiQypIUSAiaXiIrGPY+C74V21k5xBcKgVtq5k5pADTy5B3zwZHjrg0y8uQDHDdIuKzz3d+kby9I X-Received: by 2002:a50:8dc2:: with SMTP id s2mr12740034edh.318.1588862543837; Thu, 07 May 2020 07:42:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588862543; cv=none; d=google.com; s=arc-20160816; b=IG7bUCesz+7zxJQbktTLQMIagiQrCorvPY58qpQtWTah2feI0dPCdNT8qBXAPgkx/S oUTwRpM2nfwxp2dDH2walccY+JgR7itFG+DIW8cziy6Gka5He0AI4DLjOAvHMMP8+GXY lOZKvbvvN9MmrLf8l55nNyLMVIMjitfXADfrjkPgZqdQ4bjBRBwhX2k7d55OeL8g63AV k3oLC9j2UPEVT+a2RPIAae8opvpAFKDto10LouFrqtmxuNZ5B4D7ensBhQeVP539jTTZ sucZsFZdkrgQGyyAc8ZuoOn/HrGWZYO4JaF2dSXtE5d/mKx53qGLH4fQupeqp1C2MrnW luGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OAq9puwPaev9OZGBBjZ1Q+aoJOOSr9ocjHoV9XyNl6o=; b=YGINsqRoieVJMJSgZ0mnvX4h1t6vHZmBqpz9JNyuNPe7iaBQLosGpKUCfWND6G1Tht hKtihAxyMpdWIFgTV92EwQ1BxfHL340EH+slIaiu7mzoziKlwu6w3mZ3ROOAx84Uqvej QstQhH5dSiWtd2WoC/ybPYhhuNkmps/5bqznAqh84yduoiuBbpTFkVu0GYmwJkmgqoPX QfCQPDaBLBUsu5new5+lDJFGJxG0yKqkE2Q5y8BymSCJBfg93/m83sFKqdlCy3g97Jq8 8UZShhDEMvGPWzEdJLgroqTJ9qs5B7Ir6ShxdU5iy8uvuhuR2q/56eQINuhnOeTr/pco uYPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dqEKIpu7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m13si3347393eja.163.2020.05.07.07.42.00; Thu, 07 May 2020 07:42:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dqEKIpu7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728413AbgEGOir (ORCPT + 99 others); Thu, 7 May 2020 10:38:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:53226 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726661AbgEGO1c (ORCPT ); Thu, 7 May 2020 10:27:32 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 53B362084D; Thu, 7 May 2020 14:27:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588861652; bh=qLMtgJ8/c8TWxpBnHlwaeabkMU4VuzzyZFVVfNFrxxM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dqEKIpu7v7wHdJl4Zjv6W9EdmzWExlFLABijIF/AdIZLjyPQTBcA867VAGWZdbJBg I+naw1oUVVBs2eQ6CLdB4bSzjZ/AGlO14Qc7ii6dwA5IYpswVukwFGHoSfNB9//y1m r0m9jmhp5BbnAhmzWOXGN7hhymBaxhw+PgH0GOHA= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Grygorii Strashko , Peter Ujfalusi , Vinod Koul , Sasha Levin , dmaengine@vger.kernel.org Subject: [PATCH AUTOSEL 5.6 04/50] dmaengine: ti: k3-psil: fix deadlock on error path Date: Thu, 7 May 2020 10:26:40 -0400 Message-Id: <20200507142726.25751-4-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200507142726.25751-1-sashal@kernel.org> References: <20200507142726.25751-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Grygorii Strashko [ Upstream commit 172d59ecd61b89f535ad99a7e531c0f111453b9a ] The mutex_unlock() is missed on error path of psil_get_ep_config() which causes deadlock, so add missed mutex_unlock(). Fixes: 8c6bb62f6b4a ("dmaengine: ti: k3 PSI-L remote endpoint configuration") Signed-off-by: Grygorii Strashko Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200408185501.30776-1-grygorii.strashko@ti.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- 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 d7b965049ccb1..fb7c8150b0d1d 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); -- 2.20.1