From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 3E49E372ED0; Sat, 12 Sep 2026 18:56:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789239383; cv=none; b=ux9KKCodY1gOcMFq6TVz6BPrav8B1epx4vZnK0SDMiA+fBYQHk+pPH0drq+1iuMsslgBfbHk5F9N8Vqd9bDx+5HCchfS3wu6qaF+0AeJzh0DoLiZ7BC19dFM4T2hNm6Vg6cWjXknyL+n6lXlTk2FLCjr71Ss4pi+HiydwkmhNdU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789239383; c=relaxed/simple; bh=ezQDZzMvYOG95olZlkRpQ0o9keahkLI+9ioD+aFLuMk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TjdHlvcYOz08cEbLU1zXDo2MEKk6t10aGWaGzMA5FTDhr6Ha8mIxSPc6C+jEvuVpANDVi4gKy7IdmsHBpIUwPUWAzXpyWDFugeF9kp/Td56JAhq+wq9D1XlkE+7GzBVP/xBv9G3cIaAa2fQtsLV/7ebgOPQq1N7BOo+fOolH94g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=WlzJHWH2; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="WlzJHWH2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8F09E1F000FF; Sat, 12 Sep 2026 18:56:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789239381; bh=ivss0iZQUlZ0QWaGvUqKFB5foJ0PBSVH5Il+jE4xWa4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=WlzJHWH2P6ZlBSA9NKcCUutfPxbpvlpczuTh+wQtQrYuKjMctHSxkpUenvfCc/LW1 gmtoaY72HDDZrGC1ZUtxXSVGeRkEdsN3CaLnDvpZYXMOrw4Es51nGHfZ72aXoFYxs8 1bLriXfpx6ToGs1afeaZGc16IEMsO+Rfo2BcNyTg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Joy Zou , Frank Li , Mark Brown , Sasha Levin Subject: [PATCH 5.15 653/935] regulator: core: use system_freezable_wq for init complete work Date: Sat, 12 Sep 2026 09:01:23 +0200 Message-ID: <20260912065541.819589845@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065526.833703348@linuxfoundation.org> References: <20260912065526.833703348@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Joy Zou [ Upstream commit 03eab318cedd6ae34ecd34533cd986edf5237164 ] schedule_delayed_work() uses system_wq, which is non-freezable, allowing regulator_init_complete_work to run concurrently with system suspend. This work fires ~30s after boot to disable unused regulators via I2C. When it races with PM suspend, the I2C adapter may already be suspended, triggering a -ESHUTDOWN warning in __i2c_transfer(): WARNING: ... at __i2c_transfer+0x36c/0x3c8 Call trace: __i2c_transfer i2c_transfer regmap_i2c_write _regmap_update_bits regulator_disable_regmap _regulator_do_disable regulator_late_cleanup regulator_init_complete_work_function process_one_work Switch to system_freezable_wq so the work is frozen before any device is suspended, eliminating the race. Fixes: 55576cf18537 ("regulator: Defer init completion for a while after late_initcall") Signed-off-by: Joy Zou Reviewed-by: Frank Li Link: https://patch.msgid.link/20260731-b4-regulator-pf01-v2-1-a406c8737fdb@oss.nxp.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/regulator/core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index e1def5d9dd140..815acb73b3c5f 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -26,6 +26,7 @@ #include #include #include +#include #define CREATE_TRACE_POINTS #include @@ -6245,8 +6246,9 @@ static int __init regulator_init_complete(void) * we'd only do this on systems that need it, and a kernel * command line option might be useful. */ - schedule_delayed_work(®ulator_init_complete_work, - msecs_to_jiffies(30000)); + queue_delayed_work(system_freezable_wq, + ®ulator_init_complete_work, + msecs_to_jiffies(30000)); return 0; } -- 2.53.0