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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8F2E9C4345F for ; Sat, 13 Apr 2024 00:37:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AEB2410F9A6; Sat, 13 Apr 2024 00:37:20 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="buvoEH0D"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0979D10F9A5 for ; Sat, 13 Apr 2024 00:37:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1712968638; x=1744504638; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version:content-transfer-encoding; bh=IWPrJRRzvtOzBVrlolsCjNhFCkhzn36NpN1Xskn2Ghw=; b=buvoEH0D/4kJCO9fK4si9Z0dlCvgddbJqMoHd9E5s9wfxeJjICoSu8yR Rc5ig7NKQxIUCGhMr2vZnq3LNaXgM+VKdfAVBWgJtiI6BZYHsQSOEDm/Y /MmQ7d0JVD3z6UKG0+JA7U/mIRWabPd4Fzrz4iCUaPyo8kAKtdV+BfV64 fu3aHL5CjndwnJcOo96xDSalOafL6P3PiWqexYR8kNASYncWpWD/czcAs eC+5w4z+yqXUdByQjouDqTZ07VBrzhiylgJrUndQ+1Ce4oUcAcUrHOMCp umPM56JBojk8BkszI/kZuQIyRJR8LJxHPjsTzRl3uOuE0IkYLK6URIaVI w==; X-CSE-ConnectionGUID: 5eKa7Ix2RoKL7HcwgJ1X+w== X-CSE-MsgGUID: Ikkt9L9xR36eiHV/z+yGow== X-IronPort-AV: E=McAfee;i="6600,9927,11042"; a="8617823" X-IronPort-AV: E=Sophos;i="6.07,197,1708416000"; d="scan'208";a="8617823" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2024 17:37:17 -0700 X-CSE-ConnectionGUID: vuOocQhFSvqjNufdG4eUhg== X-CSE-MsgGUID: ew9tNI08TYybKOzyMuubuw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,197,1708416000"; d="scan'208";a="21814274" Received: from orsosgc001.jf.intel.com (HELO orsosgc001.intel.com) ([10.165.21.138]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2024 17:37:17 -0700 Date: Fri, 12 Apr 2024 17:37:16 -0700 Message-ID: <85edbat7wj.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Ville =?ISO-8859-1?Q?Syrj=E4l=E4?= Cc: , Badal Nilawar , Andi Shyti Subject: Re: [PATCH] drm/i915: Don't enable hwmon for selftests In-Reply-To: <85frvqt7zw.wl-ashutosh.dixit@intel.com> References: <20240410042855.130262-1-ashutosh.dixit@intel.com> <85pluwjxir.wl-ashutosh.dixit@intel.com> <85frvqt7zw.wl-ashutosh.dixit@intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (x86_64-redhat-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Fri, 12 Apr 2024 17:35:15 -0700, Dixit, Ashutosh wrote: > > On Thu, 11 Apr 2024 03:47:13 -0700, Ville Syrj=E4l=E4 wrote: > > > > On Wed, Apr 10, 2024 at 10:09:32PM -0700, Dixit, Ashutosh wrote: > > > On Wed, 10 Apr 2024 04:42:46 -0700, Ville Syrj=E4l=E4 wrote: > > > > > > > > On Tue, Apr 09, 2024 at 09:28:55PM -0700, Ashutosh Dixit wrote: > > > > > There are no hwmon selftests so there is no need to enable hwmon = for > > > > > selftests. So enable hwmon only for real driver load. > > > > > > > > > > Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10366 > > > > > Signed-off-by: Ashutosh Dixit > > > > > > > > Why are we adding duct tape instead of fixing it properly? > > > > > > Yeah pretty much what I said here myself: > > > > > > https://patchwork.freedesktop.org/patch/588585/?series=3D132243&rev= =3D1#comment_1071014 > > > > > > The issue has been difficult to root-cause. My last effort can be see= n here: > > > > > > https://patchwork.freedesktop.org/patch/584859/?series=3D131630&rev= =3D1#comment_1067888 > > > > > > Though Badal went further and saw that occasionaly the memory would g= et > > > freed first and hwmon would get unregistered as much as 2 seconds lat= er, > > > which will cause the crash if anyone touched hwmon sysfs in those fin= al 2 > > > seconds. So not sure what is causing that 2 second delay. > > > > Sounds like someone holding a sysfs file/etc. open. Should be trivial > > to do that by hand and see what happens. > > I checked this out. We see the memory being released before hwmon even wh= en > we don't access the sysfs, so it has norhing to do with holding a sysfs > file open. Holding a sysfs file open also takes a reference on the module > which will prevent the module from being unloaded, which is also what we > don't see. > > So the reordering seems to be happening in devres itself occasionally for > some reason. > > So anyway, I have submitted a new patch getting rid of devm and freeing > everything explicitly and verified that that fixes the issue: > > https://patchwork.freedesktop.org/series/132400/ > > I have also update https://patchwork.freedesktop.org/series/132400/ with > more details. Sorry I meant: https://gitlab.freedesktop.org/drm/intel/-/issues/10366