io_uring: Fix danger of completion getting reused before being read - Mailing list pgsql-hackers

From Andres Freund
Subject io_uring: Fix danger of completion getting reused before being read
Date
Msg-id bwo3e5lj2dgi2wzq4yvbyzu7nmwueczvvzioqsqo6azu6lm5oy@pbx75g2ach3p
Whole thread Raw
Responses Re: io_uring: Fix danger of completion getting reused before being read
List pgsql-hackers
Hi,

I privately got a report about a bug in method_io_uring.c:

We are calling io_uring_cqe_seen(..., cqe) before reading cqe->res. That
allows the completion to be reused, which in turn could lead to cqe->res being
overwritten. The window for that is very narrow and the likelihood of it
happening is very low, as we should never actually utilize all CQEs, but the
consequences would be bad.

I plan to push the fix soon-ish.

Greetings,

Andres Freund

Attachment

pgsql-hackers by date:

Previous
From: "Matheus Alcantara"
Date:
Subject: Re: support ALTER COLUMN SET EXPRESSION over virtual generated column with check constraint
Next
From: Movead
Date:
Subject: Re: Can we change pg_rewind used without wal_log_hints and data_checksums