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 fscrypt: Allow modular crypto algorithms 2019-12-31 10:33:51 -06:00
Makefile
auth.c ubifs: Fix memleak in ubifs_init_authentication 2021-02-12 21:53:22 +01:00
budget.c ubifs: Reserve one leb for each journal head while doing budget 2023-03-11 13:57:24 +01:00
commit.c ubifs: Pass node length in all node dumping callers 2020-12-13 22:12:32 +01:00
compress.c
crypto.c
debug.c ubifs: fix snprintf() checking 2021-06-18 22:04:47 +02:00
debug.h ubifs: ubifs_dump_sleb: Remove unused function 2020-12-13 22:12:38 +01:00
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 treewide: Change list_sort to use const pointers 2021-04-08 16:04:22 -07:00
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 ubifs: allow both hash and disk name to be provided in no-key names 2020-01-22 14:49:56 -08:00
log.c
lprops.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
lpt.c ubifs: Fix the printing type of c->big_lpt 2020-12-13 21:57:10 +01:00
lpt_commit.c mm: remove the pgprot argument to __vmalloc 2020-06-02 10:59:11 -07:00
master.c ubifs: Fix spelling mistakes 2021-06-22 09:21:39 +02:00
misc.c
misc.h ubifs: misc.h: delete a duplicated word 2020-08-02 22:59:03 +02:00
orphan.c ubifs: Pass node length in all node dumping callers 2020-12-13 22:12:32 +01:00
recovery.c ubifs: Pass node length in all node dumping callers 2020-12-13 22:12:32 +01:00
replay.c ubifs: Fix spelling mistakes 2021-06-22 09:21:39 +02:00
sb.c ubifs: Default to zstd compression 2021-04-15 22:00:26 +02:00
scan.c ubifs: Pass node length in all node dumping callers 2020-12-13 22:12:32 +01:00
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 ubifs: Fix spelling mistakes 2021-06-22 09:21:39 +02:00
tnc_misc.c ubifs: Pass node length in all node dumping callers 2020-12-13 22:12:32 +01:00
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