Commit 4dffb765 authored by Geoff Simmons's avatar Geoff Simmons

Check the errbuf safely under lock.

The thought was to shorten the time spent under the lock. But it
actually introduces a race.
parent 3117a1a7
......@@ -568,9 +568,9 @@ vmod_reader_blob(VRT_CTX, struct VPFX(file_reader) *rdr)
AZ(pthread_rwlock_rdlock(&rdr->lock));
if (rdr->flags & RDR_ERROR) {
AN(strcmp(rdr->errbuf, NO_ERR));
VRT_fail(ctx, "%s.blob(): %s", rdr->obj_name, rdr->errbuf);
AZ(pthread_rwlock_unlock(&rdr->lock));
AN(strcmp(rdr->errbuf, NO_ERR));
WS_Release(ctx->ws, 0);
return (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