Received: by 10.192.165.156 with SMTP id m28csp863051imm; Thu, 19 Apr 2018 08:46:17 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/670JO2JxwxDnzWIH8U0dVgq10toqScT8zcjVK54hMhLq4jOaMI+ZkyWrO5V+kZ7x4k+a1 X-Received: by 10.98.44.78 with SMTP id s75mr4034653pfs.237.1524152777724; Thu, 19 Apr 2018 08:46:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524152777; cv=none; d=google.com; s=arc-20160816; b=Go0qnVbx7mzgt1TJ3m5FDN1UN2x93LuOVMFgJesrkwE4c03r9RdtwHlfFXadhTv9vg KYzQpz9DQFzVMxoPhyzDJnhTiEIQDmcNqRVAsCJzU0TUq0j8zAah/Csz3JMEqUyaehdf b/SUMhMc+TO1WL+dXc4tVhJuvN1/qdp4c0p930FaTgANo7st/LMNEGljZIg2CVF2fRvq BwwUU89XiNcLJ+Q7Sn5Z2jXRiDk5Ys/VDFcRJPOmitVpAYjPPcxuBivJtWmx2Z0D/yya yqT/BaN2uQfbSDF8kZAWzUj3298Y29Er1IIol51Aw8YP8sVUH5VQbEN0CkFUbqTN+8nf 2m7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=BTe10oB4xxs9QAsnL4d6EZhHJ/ZgWeWOeak4arLU390=; b=QX4RiEYkYxg9tHk9d6alWzbDT0ZEuh6cSMVxHfk2ac5Zl9KyuQ9bCghOvTX7tqr1h6 ItnK1WcEvpamxnZuIqnlAFt5xovg490HOFnxa6f5a5nTHriQvpiwUbdtf23ryeq4Ug2B /mX4ReJ79eIh9yoK4dm5p7IAVPgUTEOFgdOn2olq2Q4E8J7Fy4tSNX/9AVrKGU/II26l zW42CR0iAZ7tJHnelbWz3eLQJc9/TJsvmpYf5fTRJkuj11b+LGgN8IDcbv+5PdmUD8cd SdBIBdogPP1uFBdKGWhGLrei/lx/JGXI2Y4phcTPKFxADe7uK+3bNRr4rpCExBQrjtCL Vj9Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z8si3194243pgs.508.2018.04.19.08.46.02; Thu, 19 Apr 2018 08:46:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753372AbeDSPnz (ORCPT + 99 others); Thu, 19 Apr 2018 11:43:55 -0400 Received: from mail.bootlin.com ([62.4.15.54]:42476 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752995AbeDSPnv (ORCPT ); Thu, 19 Apr 2018 11:43:51 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 93EEA20861; Thu, 19 Apr 2018 17:43:49 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost.localdomain (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.bootlin.com (Postfix) with ESMTPSA id 2B1FC2072F; Thu, 19 Apr 2018 17:43:49 +0200 (CEST) From: Paul Kocialkowski To: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Cc: Mauro Carvalho Chehab , Rob Herring , Mark Rutland , Maxime Ripard , Chen-Yu Tsai , Pawel Osciak , Marek Szyprowski , Kyungmin Park , Hans Verkuil , Sakari Ailus , Philipp Zabel , Arnd Bergmann , Alexandre Courbot , Tomasz Figa , Paul Kocialkowski Subject: [PATCH v2 01/10] media: v4l2-ctrls: Add missing v4l2 ctrl unlock Date: Thu, 19 Apr 2018 17:41:15 +0200 Message-Id: <20180419154124.17512-2-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180419154124.17512-1-paul.kocialkowski@bootlin.com> References: <20180419154124.17512-1-paul.kocialkowski@bootlin.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This adds a missing v4l2_ctrl_unlock call that is required to avoid deadlocks. Signed-off-by: Paul Kocialkowski --- drivers/media/v4l2-core/v4l2-ctrls.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index f67e9f5531fa..ba05a8b9a095 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -3614,10 +3614,12 @@ void v4l2_ctrl_request_complete(struct media_request *req, continue; v4l2_ctrl_lock(ctrl); + if (ref->req) ptr_to_ptr(ctrl, ref->req->p_req, ref->p_req); else ptr_to_ptr(ctrl, ctrl->p_cur, ref->p_req); + v4l2_ctrl_unlock(ctrl); } @@ -3677,8 +3679,11 @@ void v4l2_ctrl_request_setup(struct media_request *req, } } } - if (!have_new_data) + + if (!have_new_data) { + v4l2_ctrl_unlock(master); continue; + } for (i = 0; i < master->ncontrols; i++) { if (master->cluster[i]) { -- 2.16.3