linux-stable/fs/ubifs
Matthew Wilcox (Oracle) 778c6ad402 ubifs: Set page uptodate in the correct place
[ Upstream commit 723012cab7 ]

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-13 12:51:23 +02:00
..
Kconfig
Makefile
auth.c ubifs: Fix memleak in ubifs_init_authentication 2021-03-04 10:26:25 +01:00
budget.c ubifs: Reserve one leb for each journal head while doing budget 2023-03-11 16:44:09 +01:00
commit.c treewide: Remove uninitialized_var() usage 2023-06-09 10:29:01 +02:00
compress.c
crypto.c
debug.c ubifs: dent: Fix some potential memory leaks while iterating entries 2020-11-05 11:43:32 +01:00
debug.h
dir.c ubifs: ubifs_symlink: Fix memleak of inode->i_link in error path 2024-02-23 08:24:49 +01:00
file.c ubifs: Set page uptodate in the correct place 2024-04-13 12:51:23 +02:00
find.c
gc.c
io.c ubifs: Fix read out-of-bounds in ubifs_wbuf_write_nolock() 2022-04-15 14:18:28 +02:00
ioctl.c ubifs: setflags: Make dirtied_ino_d 8 bytes aligned 2022-04-15 14:18:28 +02:00
journal.c treewide: Remove uninitialized_var() usage 2023-06-09 10:29:01 +02:00
key.h
log.c
lprops.c
lpt.c treewide: Remove uninitialized_var() usage 2023-06-09 10:29:01 +02:00
lpt_commit.c
master.c
misc.c
misc.h
orphan.c ubifs: xattr: Fix some potential memory leaks while iterating entries 2020-11-05 11:43:32 +01:00
recovery.c
replay.c ubifs: Only check replay with inode type to judge if inode linked 2021-05-11 14:04:14 +02:00
sb.c ubifs: Fix wrong memory allocation 2020-02-11 04:35:20 -08:00
scan.c
shrinker.c
super.c ubifs: Fix memory leak in alloc_wbufs() 2023-03-11 16:44:09 +01:00
tnc.c treewide: Remove uninitialized_var() usage 2023-06-09 10:29:01 +02:00
tnc_commit.c
tnc_misc.c treewide: Remove uninitialized_var() usage 2023-06-09 10:29:01 +02:00
ubifs-media.h
ubifs.h ubifs: Fix build errors as symbol undefined 2023-03-11 16:44:08 +01:00
xattr.c ubifs: Fix races between xattr_{set|get} and listxattr operations 2021-07-19 08:53:16 +02:00