projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
890559e
)
p9_client_readdir() fix
author
Al Viro
<viro@zeniv.linux.org.uk>
Fri, 14 Apr 2017 21:22:18 +0000
(17:22 -0400)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Mon, 17 Apr 2017 18:23:20 +0000
(14:23 -0400)
Don't assume that server is sane and won't return more data than
asked for.
Cc: stable@vger.kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
net/9p/client.c
patch
|
blob
|
blame
|
history
diff --git
a/net/9p/client.c
b/net/9p/client.c
index 3ce672af1596cfdb8fbd67ce558366e7997b7695..8e5c6a8d0a3733d03a9c36ca8854f828cb8cc678 100644
(file)
--- 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);