projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb59bd1
)
fuse: verify write return
author
Miklos Szeredi
<mszeredi@redhat.com>
Tue, 12 Nov 2019 10:49:04 +0000
(11:49 +0100)
committer
Miklos Szeredi
<mszeredi@redhat.com>
Tue, 12 Nov 2019 10:49:04 +0000
(11:49 +0100)
Make sure filesystem is not returning a bogus number of bytes written.
Fixes:
ea9b9907b82a
("fuse: implement perform_write")
Cc: <stable@vger.kernel.org> # v2.6.26
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/file.c
patch
|
blob
|
history
diff --git
a/fs/fuse/file.c
b/fs/fuse/file.c
index
db48a5c
..
795d0f2
100644
(file)
--- a/
fs/fuse/file.c
+++ b/
fs/fuse/file.c
@@
-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;