FAILED: patch "[PATCH] fuse: verify write return" failed to apply to 4.9-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 4.9-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 <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 8aab336b14c115c6bf1d4baeb9247e41ed9ce6de Mon Sep 17 00:00:00 2001
From: Miklos Szeredi <[email protected]>
Date: Tue, 12 Nov 2019 11:49:04 +0100
Subject: [PATCH] fuse: verify write return
Make sure filesystem is not returning a bogus number of bytes written.
Fixes ea9b9907b82a ("fuse: implement perform_write")
Cc <[email protected]> # v2.6.26
Signed-off-by Miklos Szeredi <[email protected]>
fs/fuse/file.c +2 -0
@@ -1096,6 +1096,8 @@ static ssize_t fuse_send_write_pages(struct fuse_io_args *ia, ia->write.in.flags =fuse_write_flags (iocb); err =fuse_simple_request (fc, &ap->args); +if (!err && ia->write.out.size > count) + err = -EIO ; offset = ap->descs[0 ].offset; count = ia->write.out.size;