On 6/1/2026 2:16 PM, Thomas Monjalon wrote:
29/05/2026 17:26, Anatoly Burakov:
Use a numeric request ID for alarm callback lookup so stale callbacks
from rolled-back requests become harmless no-ops.
[...]
+static struct pending_request *
+find_pending_request_by_id(unsigned long id)
+{
+ struct pending_request *r;
+
+ TAILQ_FOREACH(r, &pending_requests.requests, next) {
+ if (r->id == id)
+ return r;
+ }
+
+ return NULL;
+}
This function is supposed to find only async requests?
What will happen if id wraparound and becomes 0,
matching sync requests?
I feel we should filter with r->type == REQUEST_TYPE_ASYNC
I mean it could happen if you submit `unsigned long` worth of IPC
requests, but I didn't think it was a problem that needed solving. But
sure, we can add an additional check.
--
Thanks,
Anatoly