Skip to content

Commit a84b69c

Browse files
author
Al Viro
committed
9p: forgetting to cancel request on interrupted zero-copy RPC
If we'd already sent a request and decide to abort it, we *must* issue TFLUSH properly and not just blindly reuse the tag, or we'll get seriously screwed when response eventually arrives and we confuse it for response to later request that had reused the same tag. Cc: [email protected] # v3.2 and later Signed-off-by: Al Viro <[email protected]>
1 parent 43c3dd0 commit a84b69c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/9p/client.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,8 @@ static struct p9_req_t *p9_client_zc_rpc(struct p9_client *c, int8_t type,
843843
if (err < 0) {
844844
if (err == -EIO)
845845
c->status = Disconnected;
846-
goto reterr;
846+
if (err != -ERESTARTSYS)
847+
goto reterr;
847848
}
848849
if (req->status == REQ_STATUS_ERROR) {
849850
p9_debug(P9_DEBUG_ERROR, "req_status error %d\n", req->t_err);

0 commit comments

Comments
 (0)