WSL2-Linux-Kernel/fs/ubifs
Matthew Wilcox (Oracle) f19b1023a3 ubifs: Set page uptodate in the correct place
[ Upstream commit 723012cab779eee8228376754e22c6594229bf8f ]

Page cache reads are lockless, so setting the freshly allocated page
uptodate before we've overwritten it with the data it's supposed to have
in it will allow a simultaneous reader to see old data.  Move the call
to SetPageUptodate into ubifs_write_end(), which is after we copied the
new data into the page.

Fixes: 1e51764a3c ("UBIFS: add new flash file system")
Cc: stable@vger.kernel.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-04-10 16:18:35 +02:00
..
Kconfig
Makefile
auth.c
budget.c ubifs: Reserve one leb for each journal head while doing budget 2023-03-11 13:57:24 +01:00
commit.c
compress.c
crypto.c
debug.c
debug.h
dir.c ubifs: ubifs_symlink: Fix memleak of inode->i_link in error path 2024-02-23 08:54:26 +01:00
file.c ubifs: Set page uptodate in the correct place 2024-04-10 16:18:35 +02:00
find.c
gc.c
io.c ubifs: Fix read out-of-bounds in ubifs_wbuf_write_nolock() 2022-04-08 14:24:08 +02:00
ioctl.c ubifs: setflags: Make dirtied_ino_d 8 bytes aligned 2022-04-08 14:24:08 +02:00
journal.c ubifs: Rename whiteout atomically 2022-04-08 14:24:08 +02:00
key.h
log.c
lprops.c
lpt.c
lpt_commit.c
master.c
misc.c
misc.h
orphan.c
recovery.c
replay.c
sb.c
scan.c
shrinker.c
super.c ubifs: Fix memory leak in alloc_wbufs() 2023-03-11 13:57:25 +01:00
tnc.c ubifs: Fix memleak when insert_old_idx() failed 2023-05-11 23:00:18 +09:00
tnc_commit.c
tnc_misc.c
ubifs-media.h
ubifs.h ubifs: Fix AA deadlock when setting xattr for encrypted file 2023-05-17 11:50:13 +02:00
xattr.c ubifs: Fix AA deadlock when setting xattr for encrypted file 2023-05-17 11:50:13 +02:00