mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-23 05:57:33 +00:00
dm: fix mevent timing issue
If a file descriptor being monitored by epoll_wait is closed in another thread, the result is unspecified. So add all mevents removed in other threads to delete list. And drain the list in the dispatch mevent thread. Tracked-On: #6877 Signed-off-by: Yuanyuan Zhao <yuanyuan.zhao@linux.intel.com> Acked-by: Wang, Yu1 <yu1.wang@intel.com>
This commit is contained in:
parent
3f78ba191e
commit
a609c9799a
@ -341,7 +341,7 @@ mevent_delete_event(struct mevent *evp, int closefd)
|
||||
evp->closefd = closefd;
|
||||
|
||||
epoll_ctl(epoll_fd, EPOLL_CTL_DEL, evp->me_fd, NULL);
|
||||
if (!is_dispatch_thread() && evp->teardown != NULL) {
|
||||
if (!is_dispatch_thread()) {
|
||||
mevent_add_to_del_list(evp, closefd);
|
||||
} else {
|
||||
if (evp->closefd) {
|
||||
|
Loading…
Reference in New Issue
Block a user