From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796388006; b=auu81E8pvP1IIqFXbh6ULVpZic8AMPdUv3BNlB1rJTSKK6UyFN/zaX3JC7T1XgocR4fN 4yWFgyiFA19j5r09Tt3fv1llCQRglFn2JZKAyRLrYimTajHLV28v08qX/VBu4KM0JrKbq WdTMp+QktMTvcTiG+JFULbExKNl6wQ1vlGqfsaeU3JbbeJWMUZTKZqrG2nJDBUlJYH9do QT5IjdfrKV4c8eAPC2PrHdAM0M1NNLInRgRvSjSIHB76D83/cuQRX5WgDzFPhsPXt32f6 a0lwXfoMlYE7UUS71mO6fQOSbpdEc0nxHTd5f+Xif4CgTCA/NiC6c4Yvvd44e03rpGg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796388006; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=972q4eoNm94dFZMguCiFkoN5F4BZDuALpDV9hXzG8RY=; b=TYG59DBT2KfhD55yrUuBegP7tV5uC0xanKvIATDIxFdJvyDxM+MhqH40l8VxCqWqkWpp 2EhKVhNraOqDBQ0bbE1cIKu5TonFsaH91DTGQYBw9/XWDvhBGLfQMSm6Wb2tRwmAxN4Ju mF4wZchudpUhVVbcQUhKkzcx9X47sV5cpPsnL0Ghm/iwgdCqvG7u8jI17rqhx23WOQwl3 A7cZvpKxaDezUfB/89ktjLJkM7rJvYjLxqMSjLBKO30yk4YJrEhiNfSWLxKA0wA1N75Pt h9XTO/lf+T67rINVFbYBoVoyAYCSY138cBYSYEuIh3M7F187fNxzngLs7o8YJ840gaw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=2igLDka4; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 03412606A322; Fri, 4 Dec 2026 12:40:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=2igLDka4 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 733991F00931; Fri, 4 Dec 2026 12:40:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796388005; bh=972q4eoNm94dFZMguCiFkoN5F4BZDuALpDV9hXzG8RY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=2igLDka4B3ZJC6fZW/MpnWlFMFeCeiZhFTBk/ReCux5U78iE6laLdOtHG4CSOmklM 54vSgDNcqgNa3igVDDlP9wsGrquX3qvuA+ct/FdXGTND4Lse3ZrgP11QLbEkZBT4qa mlJgKXJf9SU8IVMF/fJ34fQYEyZxkoyHoP7pZpDU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Tejun Heo , Josef Bacik , Jens Axboe , Sasha Levin Subject: [PATCH 6.1 0446/1059] blk-iolatency: flush enable_work after going offline Date: Fri, 4 Dec 2026 18:59:37 +0900 Message-ID: <20261204100655.855821369@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100643.980430235@linuxfoundation.org> References: <20261204100643.980430235@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Josef Bacik [ Upstream commit 020f61242d6ebeba5f8f2ef6e429aeffdd63f1c1 ] blkcg_iolatency_exit() flushes enable_work before it deactivates the policy, but iolatency_pd_offline() schedules it again for the last group with a target, so the blk_iolatency is freed with the work queued. Flush it after the deactivation. Fixes: 8a177a36da6c ("blk-iolatency: Fix inflight count imbalances and IO hangs on offline") Cc: Tejun Heo Signed-off-by: Josef Bacik Acked-by: Tejun Heo Link: https://patch.msgid.link/20261028164415.1262013-24-axboe@kernel.dk Signed-off-by: Jens Axboe [ sashal: adjusted context lines to the older spellings, del_timer_sync() and rqos->q, instead of timer_shutdown_sync() and rqos->disk; the flush_work reorder itself is identical. ] Signed-off-by: Sasha Levin --- block/blk-iolatency.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/blk-iolatency.c b/block/blk-iolatency.c index 10d0ffccc874d..5562c48b25ae3 100644 --- a/block/blk-iolatency.c +++ b/block/blk-iolatency.c @@ -646,8 +646,9 @@ static void blkcg_iolatency_exit(struct rq_qos *rqos) struct blk_iolatency *blkiolat = BLKIOLATENCY(rqos); del_timer_sync(&blkiolat->timer); - flush_work(&blkiolat->enable_work); blkcg_deactivate_policy(rqos->q, &blkcg_policy_iolatency); + /* iolatency_pd_offline() schedules it for the last group with a target */ + flush_work(&blkiolat->enable_work); kfree(blkiolat); } -- 2.53.0