summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-04-27 11:09:37 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2017-04-27 11:09:37 -0700
commitf56fc7bdaa22e7b2fac18de430db8195d2dfd7bd (patch)
tree7888be1d5179784a70d670fdf2542cc382bf93b4 /net
parent59372bbf3abd5b24a7f6f676a3968685c280f955 (diff)
parent1741937d475d91ed95abb37f07e8571e23b9a7fe (diff)
downloadlinux-0-day-f56fc7bdaa22e7b2fac18de430db8195d2dfd7bd.tar.gz
linux-0-day-f56fc7bdaa22e7b2fac18de430db8195d2dfd7bd.tar.xz
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 3ce672af1596c..8e5c6a8d0a373 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);