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 35683386422 for ; Tue, 4 Aug 2026 02:55:49 +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=1785812151; cv=none; b=tnunFq0aYm3Djv3kAv24CUdxRRNa95SW/fCynxX52swOYQoOe6QvTp8imnRKVwzbqk0D75nIGxFJPAhpPWZ2KN9lQ4U1SWkHHk3uf3RpJs7Uw1XN34MbcXlje56sQSd5emDPrg78GIlxbd8GkvG4OMoKv925P+t51Qx3gD2Fu+o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785812151; c=relaxed/simple; bh=Bjvi8ZgC8z094Tj6fyV6a9CJfqn0NQhZ4I/ihyu0BR0=; h=Message-ID:Date:MIME-Version:Cc:Subject:To:References:From: In-Reply-To:Content-Type; b=Yj8992BqjnjKeNV9NiopT+V20NaIBZdoGoS2cfAU1qB7DyTHtPInVsgndp6vsgIPlSmN0mqKo5d8nyPvqWtRou1po+XlBqmRNLCNzJv7j3ZVjniJ0mYL8I+Kq2AG3dUyWhT4Xt6uHMOb2dMbgKOPiR0YLMsm6dux6YvRKe9s/aI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=IbsyfEhW; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IbsyfEhW" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6F2FF1F000E9; Tue, 4 Aug 2026 02:55:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785812149; bh=9sMXVCVRu6HkzwiLjNbUtN5xbg/2Po9gPBpf4aBtlhk=; h=Date:Cc:Subject:To:References:From:In-Reply-To; b=IbsyfEhWdyJwXHx+q52Yuu987fYew+OPeVwIks2N2vWLlIOfZ2/xzZWREYj5cWTYv 8SiGu/dw5pX+wlkZebD80zk7A/Tu/P1ZcU6lSCVhgmDpBX8YhgWRoDWt0ITrMt0j/4 18QXYy2OLUNryOkuFv/bp6jSTrgbn03adcminAm0iTX4XUCq/lr7VHJGef1OPIrHYf U0m/fOCD+abTL2UbmYJgUF4E++rwXCCi0ABSgbbvK5hsKReZnpBv5ClZab/zXrM3Z3 hqinhb1VuOOUvLz6xFLPzYZhRwN419HEYJIj09WZrOM6mygJ0RTpd631NcXdkTsYwd TMgwigcSzeS1A== Message-ID: <81d7efa2-8e60-4f92-9cf0-613f6116756c@kernel.org> Date: Tue, 4 Aug 2026 10:55:46 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: chao@kernel.org, stable@kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, qiwenjie@xiaomi.com Subject: Re: [PATCH v4 1/2] f2fs: avoid NULL checkpoint thread access in sysfs To: Wenjie Qi , jaegeuk@kernel.org References: <20260804014849.1942326-1-qiwenjie@xiaomi.com> Content-Language: en-US From: Chao Yu In-Reply-To: <20260804014849.1942326-1-qiwenjie@xiaomi.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 8/4/26 09:48, Wenjie Qi wrote: > checkpoint_merge can be enabled even when no checkpoint merge thread is > running. A read-only mount is one case: f2fs does not start > f2fs_issue_ckpt there, but ckpt_thread_ioprio is still writable through > sysfs. > > The ckpt_thread_ioprio store path updates the saved ioprio value and, > when checkpoint_merge is enabled, calls set_task_ioprio() for the > checkpoint thread. If cprc->f2fs_issue_ckpt is NULL, that dereferences a > NULL task pointer. > > Protect ckpt_thread_ioprio sysfs writes with s_umount as well, so the > checkpoint thread cannot disappear under the store path while updating > its ioprio. > > Fixes: e65920661708 ("f2fs: add ckpt_thread_ioprio sysfs node") > Cc: stable@kernel.org > Signed-off-by: Wenjie Qi Reviewed-by: Chao Yu Thanks,