Commit c9028924 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp Committed by Lasse Karstensen

Don't attempt to allocate a V1L from the workspace if it is overflowed.

Fixes:	#1796
Also triggered by:	The Wemm-Field
parent be937f90
......@@ -112,10 +112,12 @@ V1D_Deliver(struct req *req, struct busyobj *bo, int sendbody)
if (sendbody && req->resp_len != 0)
VDP_push(req, v1d_bytes, NULL, 1);
AZ(req->wrk->v1l);
V1L_Reserve(req->wrk, req->ws, &req->sp->fd, req->vsl, req->t_prev);
if (WS_Overflowed(req->ws)) {
v1d_error(req, "workspace_client overflow");
AZ(req->wrk->v1l);
return;
}
......@@ -134,5 +136,6 @@ V1D_Deliver(struct req *req, struct busyobj *bo, int sendbody)
if ((V1L_FlushRelease(req->wrk) || ois != OIS_DONE) && req->sp->fd >= 0)
SES_Close(req->sp, SC_REM_CLOSE);
AZ(req->wrk->v1l);
VDP_close(req);
}
......@@ -78,6 +78,8 @@ V1L_Reserve(struct worker *wrk, struct ws *ws, int *fd, struct vsl_log *vsl,
CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
AZ(wrk->v1l);
if (WS_Overflowed(ws))
return;
res = WS_Snapshot(ws);
v1l = WS_Alloc(ws, sizeof *v1l);
if (v1l == NULL)
......
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