We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1399782 commit 6fdf339Copy full SHA for 6fdf339
fs/nfs/nfs42xdr.c
@@ -330,13 +330,21 @@ static int decode_write_response(struct xdr_stream *xdr,
330
struct nfs42_write_res *res)
331
{
332
__be32 *p;
333
- int stateids;
334
335
p = xdr_inline_decode(xdr, 4 + 8 + 4);
336
if (unlikely(!p))
337
goto out_overflow;
338
339
- stateids = be32_to_cpup(p++);
+ /*
+ * We never use asynchronous mode, so warn if a server returns
340
+ * a stateid.
341
+ */
342
+ if (unlikely(*p != 0)) {
343
+ pr_err_once("%s: server has set unrequested "
344
+ "asynchronous mode\n", __func__);
345
+ return -EREMOTEIO;
346
+ }
347
+ p++;
348
p = xdr_decode_hyper(p, &res->count);
349
res->verifier.committed = be32_to_cpup(p);
350
return decode_verifier(xdr, &res->verifier.verifier);
0 commit comments