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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A26DC433F5 for ; Mon, 1 Nov 2021 11:36:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6E9D7610A8 for ; Mon, 1 Nov 2021 11:36:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232035AbhKALiz (ORCPT ); Mon, 1 Nov 2021 07:38:55 -0400 Received: from mga01.intel.com ([192.55.52.88]:11847 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231485AbhKALiw (ORCPT ); Mon, 1 Nov 2021 07:38:52 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10154"; a="254603062" X-IronPort-AV: E=Sophos;i="5.87,199,1631602800"; d="scan'208";a="254603062" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Nov 2021 04:31:54 -0700 X-IronPort-AV: E=Sophos;i="5.87,199,1631602800"; d="scan'208";a="599003355" Received: from smile.fi.intel.com ([10.237.72.184]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Nov 2021 04:31:51 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.95) (envelope-from ) id 1mhVXK-002eHD-Ip; Mon, 01 Nov 2021 13:31:34 +0200 Date: Mon, 1 Nov 2021 13:31:34 +0200 From: Andy Shevchenko To: Daniel Scally Cc: Paul Kocialkowski , linux-media@vger.kernel.org, Yong Zhi , Sakari Ailus , Bingbu Cao , Tianshu Qiu , Hans de Goede , Laurent Pinchart , Kieran Bingham Subject: Re: [PATCH v4 16/16] media: i2c: ov8865: Fix lockdep error Message-ID: References: <20211101001119.46056-1-djrscally@gmail.com> <20211101001119.46056-17-djrscally@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211101001119.46056-17-djrscally@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org On Mon, Nov 01, 2021 at 12:11:19AM +0000, Daniel Scally wrote: > From: Hans de Goede > > ov8865_state_init() calls ov8865_state_mipi_configure() which uses > __v4l2_ctrl_s_ctrl[_int64](). This means that sensor->mutex (which > is also sensor->ctrls.handler.lock) must be locked before calling > ov8865_state_init(). > > Note ov8865_state_mipi_configure() is also used in other places where > the lock is already held so it cannot be changed itself. > > This fixes the following lockdep kernel WARN: > [ 13.233413] ------------[ cut here ]------------ You may drop this noisy line. > [ 13.233421] WARNING: CPU: 0 PID: 8 at drivers/media/v4l2-core/v4l2-ctrls-api.c:833 __v4l2_ctrl_s_ctrl+0x4d/0x60 [videodev] > ... > [ 13.234063] Call Trace: > [ 13.234074] ov8865_state_configure+0x98b/0xc00 [ov8865] > [ 13.234095] ov8865_probe+0x4b1/0x54c [ov8865] > [ 13.234117] i2c_device_probe+0x13c/0x2d0 Seems to me that this should be moved to the head of the series with Fixes tag added. -- With Best Regards, Andy Shevchenko