[PATCH] async-thread: avoid closing eventfd twice
authorAndy Pan <i@andypan.me>
Thu, 12 Dec 2024 12:48:56 +0000 (12:48 +0000)
committerPeter Michael Green <plugwash@raspbian.org>
Fri, 24 Jan 2025 04:39:00 +0000 (04:39 +0000)
commit183bc45e67e5eebd0002aa9b6e783fd7df7c90cf
treef67a8ed15ce2810e43f33d96b6d0b7c391752c28
parent5dd822106f5c9a32a5b66f2dd669285734668f7e
[PATCH] async-thread: avoid closing eventfd twice

When employing eventfd for socketpair, there is only one file
descriptor. Closing that fd twice might result in fd corruption.
Thus, we should avoid closing the eventfd twice, following the
pattern in lib/multi.c.

Fixes #15725
Closes #15727
Reported-by: Christian Heusel
Gbp-Pq: Name async_thread_avoid_closing_eventfd_twice.patch
lib/asyn-thread.c