[PATCH] async-thread: avoid closing eventfd twice
authorAndy Pan <i@andypan.me>
Thu, 12 Dec 2024 12:48:56 +0000 (12:48 +0000)
committerSamuel Henrique <samueloph@debian.org>
Thu, 12 Dec 2024 21:38:04 +0000 (21:38 +0000)
commit48c53c687981c3f36dadcac999de3d9b554e0983
tree1c4469c87b1d9d281d8dc463f8e389162f9807b8
parent876f8945056eb2eb2186c63a67e30c510b4c97f5
[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