Skip to content

Commit c34d999

Browse files
dhowellskuba-moo
authored andcommitted
rxrpc: rxperf: Fix missing decoding of terminal magic cookie
The rxperf RPCs seem to have a magic cookie at the end of the request that was failing to be taken account of by the unmarshalling of the request. Fix the rxperf code to expect this. Fixes: 75bfdbf ("rxrpc: Implement an in-kernel rxperf server for testing purposes") Signed-off-by: David Howells <[email protected]> cc: Marc Dionne <[email protected]> cc: Simon Horman <[email protected]> cc: [email protected] Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent f06e4bf commit c34d999

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

net/rxrpc/rxperf.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,18 @@ static int rxperf_deliver_request(struct rxperf_call *call)
478478
call->unmarshal++;
479479
fallthrough;
480480
case 2:
481+
ret = rxperf_extract_data(call, true);
482+
if (ret < 0)
483+
return ret;
484+
485+
/* Deal with the terminal magic cookie. */
486+
call->iov_len = 4;
487+
call->kvec[0].iov_len = call->iov_len;
488+
call->kvec[0].iov_base = call->tmp;
489+
iov_iter_kvec(&call->iter, READ, call->kvec, 1, call->iov_len);
490+
call->unmarshal++;
491+
fallthrough;
492+
case 3:
481493
ret = rxperf_extract_data(call, false);
482494
if (ret < 0)
483495
return ret;

0 commit comments

Comments
 (0)