From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87161C33CB3 for ; Thu, 16 Jan 2020 17:48:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 574DD2468D for ; Thu, 16 Jan 2020 17:48:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579196893; bh=LceMdP0lTz3aCuW0kPjDRp4oE/CQZJ5PTR4oo7v7fnA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Cw1iNUeYYIPdwuj4dWeIfoELoKWeXNq/NBMQehNE6nqF215rvuUEw5jTOQQher3VH B6kj7j8EfkKwyYsFljWe/+BhYNzHZSjjHTjH9kXB+Bj6xDxFbvy2c4T84Fn94Fx2/Z g7+ch8TOW6DyOcBwBXUxDt/udbacUJo1AHTjXF8E= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394304AbgAPRsA (ORCPT ); Thu, 16 Jan 2020 12:48:00 -0500 Received: from mail.kernel.org ([198.145.29.99]:39748 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406767AbgAPRqn (ORCPT ); Thu, 16 Jan 2020 12:46:43 -0500 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 44905246EE; Thu, 16 Jan 2020 17:46:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579196802; bh=LceMdP0lTz3aCuW0kPjDRp4oE/CQZJ5PTR4oo7v7fnA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eELqZk3imwxVstkYhmxK/f7nB1bzHCVHP/zRLoaIZGr6pG21OZtlDmDat5uvDFh+O SuxYalFcQ4V9D8WIl+ZkqgrGJ/dxOIIRS0TtBlgTpHgdJsSdzUW/dy3MhdJ0vBvh2C nKFfwao8Ywi4xLuqBhcDs0FkiwfULAat0bUpGD1o= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Seung-Woo Kim , Sylwester Nawrocki , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH AUTOSEL 4.4 161/174] media: exynos4-is: Fix recursive locking in isp_video_release() Date: Thu, 16 Jan 2020 12:42:38 -0500 Message-Id: <20200116174251.24326-161-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200116174251.24326-1-sashal@kernel.org> References: <20200116174251.24326-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Seung-Woo Kim [ Upstream commit 704c6c80fb471d1bb0ef0d61a94617d1d55743cd ] >>From isp_video_release(), &isp->video_lock is held and subsequent vb2_fop_release() tries to lock vdev->lock which is same with the previous one. Replace vb2_fop_release() with _vb2_fop_release() to fix the recursive locking. Fixes: 1380f5754cb0 ("[media] videobuf2: Add missing lock held on vb2_fop_release") Signed-off-by: Seung-Woo Kim Reviewed-by: Sylwester Nawrocki Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/platform/exynos4-is/fimc-isp-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/exynos4-is/fimc-isp-video.c b/drivers/media/platform/exynos4-is/fimc-isp-video.c index 667d3720154a..4b7803cec37f 100644 --- a/drivers/media/platform/exynos4-is/fimc-isp-video.c +++ b/drivers/media/platform/exynos4-is/fimc-isp-video.c @@ -323,7 +323,7 @@ static int isp_video_release(struct file *file) ivc->streaming = 0; } - vb2_fop_release(file); + _vb2_fop_release(file, NULL); if (v4l2_fh_is_singular_file(file)) { fimc_pipeline_call(&ivc->ve, close); -- 2.20.1