+18
−9
+2
−1
Loading
stable inclusion from stable-v6.8.2 commit 52982edfcefd475cc34af663d5c47c0cddaa5739 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9L9NO CVE: CVE-2024-27034 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=52982edfcefd475cc34af663d5c47c0cddaa5739 -------------------------------- [ Upstream commit fd244524c2cf07b5f4c3fe8abd6a99225c76544b ] When we overwrite compressed cluster w/ normal cluster, we should not unlock cp_rwsem during f2fs_write_raw_pages(), otherwise data will be corrupted if partial blocks were persisted before CP & SPOR, due to cluster metadata wasn't updated atomically. Fixes: 4c8ff709 ("f2fs: support data compression") Reviewed-by:Daeho Jeong <daehojeong@google.com> Signed-off-by:
Chao Yu <chao@kernel.org> Signed-off-by:
Jaegeuk Kim <jaegeuk@kernel.org> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Yifan Qiao <qiaoyifan4@huawei.com>