From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6C282268690 for ; Wed, 19 Aug 2026 07:50:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787125854; cv=none; b=i9Tsd3sSyZ/ABgIjr55zJLRwXOqfMpLzoMupX9rh6TuSIpmuaZxAknMDHDnklKdKreEKs6KlU2ctYd88mDjBTXVaz895P9kRZd8eTE3intoQ/cJJQnSxEGDRJCm4iJVa6OcrqZFteajQNasHsZiP+Fwwnj+wbhgHAdt1EC2PJGQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787125854; c=relaxed/simple; bh=grB1rGCURPo7Bsaw2ixE+ZoKeqAsPLRkjEg2AqS8HlM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZBYmBzoAHXM5oGwdU36+w0IzLNL1TScR1Ah/7+hr7dH8qjf0oeJilmG1FsSMapv9FTEjstB4vW71W4h9INeXLJl5OKUVePIlqEYw+umvYM6jlLjwFIa5D9kOrGj/gfODRxWmQGQ+GZNpX8L7wbIungYl1ZjM8k0y1QHajk/XlrU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=jO+tVQbh; arc=none smtp.client-ip=198.175.65.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="jO+tVQbh" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1787125852; x=1818661852; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=grB1rGCURPo7Bsaw2ixE+ZoKeqAsPLRkjEg2AqS8HlM=; b=jO+tVQbh2xTm8uY+8xTtK9A/ElD/4XM4Qb1IT9XrEH9HdBXM1WCsdEga WQ8Ikrh2WDm1kz0ySF2GdKnmaJIX6z4kXCJH2kBy6cO+/BUCG4SIdFFoi sP+ja/1dNp8lbCDA4507Vowut6R4eRNzhBT/bsqe8IBQj1AbO4F/CrXQ0 c/vUNzIaG1ckDOWHdiGH0NrYu6hUUgyX4XR+3/2L1notTtMFg6mR99vfG 8tuXke14lj7md60k4drdTP0cB+UkDekNZBW/GanYDr8EdR4bQRYIy60aS 245ezPMekggrm62zwS87UfOACDycXHHiVRFABKdSn9gKqes7khYHz6TMc Q==; X-CSE-ConnectionGUID: l5NeKH+CSkGfdSMATOU20g== X-CSE-MsgGUID: VowRNg5HQku1spWbVI1QrQ== X-IronPort-AV: E=McAfee;i="6800,10657,11879"; a="99156223" X-IronPort-AV: E=Sophos;i="6.25,231,1779174000"; d="scan'208";a="99156223" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Aug 2026 00:50:51 -0700 X-CSE-ConnectionGUID: xCfP6eQrRG6v06BWUMzp6g== X-CSE-MsgGUID: F11HvTxbTAql5gZBfRJ2uQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,231,1779174000"; d="scan'208";a="261245038" Received: from amilburn-desk.amilburn-desk (HELO localhost) ([10.245.244.106]) by fmviesa006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Aug 2026 00:50:50 -0700 Date: Wed, 19 Aug 2026 10:50:47 +0300 From: Andy Shevchenko To: kr494167@gmail.com Cc: andy.shevchenko@gmail.com, andy@kernel.org, geert@linux-m68k.org, chris.packham@alliedtelesis.co.nz, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/3 3/3] auxdisplay: max6959: fix work initialization race and convert to devm_linedisp_register() Message-ID: References: <20260819024556.63534-1-kr494167@gmail.com> <20260819024556.63534-4-kr494167@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260819024556.63534-4-kr494167@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo On Wed, Aug 19, 2026 at 08:15:56AM +0530, kr494167@gmail.com wrote: > INIT_DELAYED_WORK(&priv->work, max6959_disp_update) was previously called > inside max6959_linedisp_get_map_type(), which is invoked during/after > linedisp_register(). Initializing a delayed_work structure inside a map > query callback can re-initialize an active work item or race with > max6959_linedisp_update(). > > In addition, max6959_i2c_remove() called cancel_delayed_work_sync() before > linedisp_unregister(&priv->linedisp), allowing sysfs updates to > reschedule work after cancel_delayed_work_sync() completed. > > Fix these by moving INIT_DELAYED_WORK() to probe(), using > devm_add_action_or_reset() for work cancellation, and converting to > devm_linedisp_register(). Registering devm_linedisp_register() after > work cancellation action ensures proper LIFO teardown order, allowing > max6959_i2c_remove() to be removed entirely. Use devm_delayed_work_autocancel() from devm-helpers.h. Also try to squeeze this most likely AI-assisted commit message to the point. ... Same comment to the other fix-patch. -- With Best Regards, Andy Shevchenko