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 97C3516A395 for ; Tue, 4 Aug 2026 00:03:58 +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=1785801839; cv=none; b=Cgf6Mtyvk/6MhKz8kh5H/MSCcMUipKzuGL6B8YgtrPrcWCK5hbf16SjNc6nI3TfL+OI8lVAbeFAr0SEIe2J9ENRxAmm2idYnN1sTdcXNtzAGjSSK7/zphbhAR+I/wvdol7Kl+N8p8CvC24aPF/VDbFqn3rGDQ0rb3tnXGSaa3iQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785801839; c=relaxed/simple; bh=5uBzMH3C6xW+FIrRCEGwOF72+L+NONkeSjwJ8FQlsvI=; h=Message-ID:Date:MIME-Version:Cc:Subject:To:References:From: In-Reply-To:Content-Type; b=ftN+ghuPqUO/RSLtc2f/WmhDu88IifinYkZsxbu8jhvYTN5TkOwaOysBfe/xNskeWWhtRZOE/W6wLxKXLEYgfHBoz7ZK7eyiuJntZzGlHkqtBOljRng2DQ7uBJUjAoKwg8rGQp3ifR44ImbKhwNupFxGVD000k3VjYxCuL9mZA8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=b6BLhWFQ; 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="b6BLhWFQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E7A521F000E9; Tue, 4 Aug 2026 00:03:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1785801838; bh=dcABTRhfi53RQ+j/GQA+fU4xh8TauAjt420CWoYoQ1A=; h=Date:Cc:Subject:To:References:From:In-Reply-To; b=b6BLhWFQ3VEy8nc3WHYtb1vDZ4x8XuSBtQ8/qiggIVTdY5PZgGgXH/wRMjjV1osmB 3FtACAGY59knxpmCEw8o25q6wjGv4BuPdrl+mkH5mktLg9KTGNBGieedqEqgvfXjD+ z7TsMv7xoQ3ySvvu9wuhFGscRrdth0xa3h+uf6k0HAqPFOGhx6/7CR9FplHVi4UiVv gPAOuz7JuDpDg4w+gTscq/nXeSfXlFjPQIWpztMvaHzhciq+faFdfWz7lHHbz2gcXY mGC+L04X2gqgvj/i3Ung1OU/ldaNpLtMCUs5Ayg1MhBKMKKCtisKOCcrmN0qUEIMzb 8BiFkMRaj5Xjw== Message-ID: <1c7a599a-2a9a-44f0-9d03-cb1c87f81cd3@kernel.org> Date: Tue, 4 Aug 2026 08:03:55 +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, linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, qiwenjie@xiaomi.com, stable@kernel.org Subject: Re: [PATCH v3 1/2] f2fs: avoid NULL checkpoint thread access in sysfs To: Wenjie Qi , jaegeuk@kernel.org References: <20260803123251.1522864-1-qiwenjie@xiaomi.com> Content-Language: en-US From: Chao Yu In-Reply-To: <20260803123251.1522864-1-qiwenjie@xiaomi.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 8/3/26 20:32, 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,