summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorLinus Torvalds2017-04-27 20:09:37 +0200
committerLinus Torvalds2017-04-27 20:09:37 +0200
commitf56fc7bdaa22e7b2fac18de430db8195d2dfd7bd (patch)
tree7888be1d5179784a70d670fdf2542cc382bf93b4 /net
parentstatx: correct error handling of NULL pathname (diff)
parentuapi: change the type of struct statx_timestamp.tv_nsec to unsigned (diff)
downloadkernel-qcow2-linux-f56fc7bdaa22e7b2fac18de430db8195d2dfd7bd.tar.gz
kernel-qcow2-linux-f56fc7bdaa22e7b2fac18de430db8195d2dfd7bd.tar.xz
kernel-qcow2-linux-f56fc7bdaa22e7b2fac18de430db8195d2dfd7bd.zip
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs fixes from Al Viro: - fix orangefs handling of faults on write() - I'd missed that one back when orangefs was going through review. - readdir counterpart of "9p: cope with bogus responses from server in p9_client_{read,write}" - server might be lying or broken, and we'd better not overrun the kmalloc'ed buffer we are copying the results into. - NFS O_DIRECT read/write can leave iov_iter advanced by too much; that's what had been causing iov_iter_pipe() warnings davej had been seeing. - statx_timestamp.tv_nsec type fix (s32 -> u32). That one really should go in before 4.11. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: uapi: change the type of struct statx_timestamp.tv_nsec to unsigned fix nfs O_DIRECT advancing iov_iter too much p9_client_readdir() fix orangefs_bufmap_copy_from_iovec(): fix EFAULT handling
Diffstat (limited to 'net')
-rw-r--r--net/9p/client.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/9p/client.c b/net/9p/client.c
index 3ce672af1596..8e5c6a8d0a37 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -2101,6 +2101,10 @@ int p9_client_readdir(struct p9_fid *fid, char *data, u32 count, u64 offset)
trace_9p_protocol_dump(clnt, req->rc);
goto free_and_error;
}
+ if (rsize < count) {
+ pr_err("bogus RREADDIR count (%d > %d)\n", count, rsize);
+ count = rsize;
+ }
p9_debug(P9_DEBUG_9P, "<<< RREADDIR count %d\n", count);