summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/9p/client.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/9p/client.c b/net/9p/client.c
index a2b4a965a5a9..7b2a997662d9 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -519,10 +519,9 @@ static int p9_check_errors(struct p9_client *c, struct p9_req_t *req)
int ecode;
err = p9_parse_header(&req->rc, NULL, &type, NULL, 0);
- if (req->rc.size >= c->msize) {
- p9_debug(P9_DEBUG_ERROR,
- "requested packet size too big: %d\n",
- req->rc.size);
+ if (req->rc.size > req->rc.capacity && !req->rc.zc) {
+ pr_err("requested packet size too big: %d does not fit %zu (type=%d)\n",
+ req->rc.size, req->rc.capacity, req->rc.id);
return -EIO;
}
/* dump the response from server