* FAILED: patch "[PATCH] fs: ext4: initialize fsdata in pagecache_write()" failed to apply to 5.4-stable tree
@ 2023-01-04 14:55 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2023-01-04 14:55 UTC (permalink / raw)
To: glider, ebiggers, ebiggers, tytso; +Cc: stable
The patch below does not apply to the 5.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.
Possible dependencies:
956510c0c743 ("fs: ext4: initialize fsdata in pagecache_write()")
bd256fda92ef ("ext4: use memcpy_to_page() in pagecache_write()")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 956510c0c7439e90b8103aaeaf4da92878c622f0 Mon Sep 17 00:00:00 2001
From: Alexander Potapenko <glider@google.com>
Date: Mon, 21 Nov 2022 12:21:30 +0100
Subject: [PATCH] fs: ext4: initialize fsdata in pagecache_write()
When aops->write_begin() does not initialize fsdata, KMSAN reports
an error passing the latter to aops->write_end().
Fix this by unconditionally initializing fsdata.
Cc: Eric Biggers <ebiggers@kernel.org>
Fixes: c93d8f885809 ("ext4: add basic fs-verity support")
Reported-by: syzbot+9767be679ef5016b6082@syzkaller.appspotmail.com
Signed-off-by: Alexander Potapenko <glider@google.com>
Reviewed-by: Eric Biggers <ebiggers@google.com>
Link: https://lore.kernel.org/r/20221121112134.407362-1-glider@google.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
diff --git a/fs/ext4/verity.c b/fs/ext4/verity.c
index 3c640bd7ecae..30e3b65798b5 100644
--- a/fs/ext4/verity.c
+++ b/fs/ext4/verity.c
@@ -79,7 +79,7 @@ static int pagecache_write(struct inode *inode, const void *buf, size_t count,
size_t n = min_t(size_t, count,
PAGE_SIZE - offset_in_page(pos));
struct page *page;
- void *fsdata;
+ void *fsdata = NULL;
int res;
res = aops->write_begin(NULL, mapping, pos, n, &page, &fsdata);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-01-04 14:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-04 14:55 FAILED: patch "[PATCH] fs: ext4: initialize fsdata in pagecache_write()" failed to apply to 5.4-stable tree gregkh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.