if server claims to have written/read more than we'd told it to,
warn and cap the claimed byte count to avoid advancing more than
we are ready to.
                        p9_free_req(clnt, req);
                        break;
                }
+               if (rsize < count) {
+                       pr_err("bogus RREAD count (%d > %d)\n", count, rsize);
+                       count = rsize;
+               }
 
                p9_debug(P9_DEBUG_9P, "<<< RREAD count %d\n", count);
                if (!count) {
                        p9_free_req(clnt, req);
                        break;
                }
+               if (rsize < count) {
+                       pr_err("bogus RWRITE count (%d > %d)\n", count, rsize);
+                       count = rsize;
+               }
 
                p9_debug(P9_DEBUG_9P, "<<< RWRITE count %d\n", count);