Commit c0b5943f authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] svc_recv() fix

From: "J. Bruce Fields" <bfields@fieldses.org>

svc_recv may call svc_sock_release before rqstp->rq_res is initialized.
parent eeb6f17b
...@@ -1255,6 +1255,7 @@ svc_recv(struct svc_serv *serv, struct svc_rqst *rqstp, long timeout) ...@@ -1255,6 +1255,7 @@ svc_recv(struct svc_serv *serv, struct svc_rqst *rqstp, long timeout)
/* No data, incomplete (TCP) read, or accept() */ /* No data, incomplete (TCP) read, or accept() */
if (len == 0 || len == -EAGAIN) { if (len == 0 || len == -EAGAIN) {
rqstp->rq_res.len = 0;
svc_sock_release(rqstp); svc_sock_release(rqstp);
return -EAGAIN; return -EAGAIN;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment