FreeBSD Bugzilla – Attachment 207708 Details for
Bug 240590
Linuxulator: EPOLLONESHOT is broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
EPOLLONESHOT.patch
LINUX_EPOLLONESHOT.patch (text/plain), 1.45 KB, created by
Vladimir Kondratyev
on 2019-09-22 01:56:15 UTC
(
hide
)
Description:
EPOLLONESHOT.patch
Filename:
MIME Type:
Creator:
Vladimir Kondratyev
Created:
2019-09-22 01:56:15 UTC
Size:
1.45 KB
patch
obsolete
>commit 7618df1ebb46ff9c8ed74fef4f5918026f43c7a9 >Author: Vladimir Kondratyev <vladimir@kondratyev.su> >Date: Mon Dec 25 20:32:19 2017 +0300 > > Linux epoll does not remove descriptor after oneshot event have fired. > Set EV_DISPATCH flag rather then EV_ONESHOT to be in line with Linux. > >diff --git a/sys/compat/linux/linux_event.c b/sys/compat/linux/linux_event.c >index f10cccec30a4..7d26ee3e5051 100644 >--- a/sys/compat/linux/linux_event.c >+++ b/sys/compat/linux/linux_event.c >@@ -306,7 +306,7 @@ epoll_to_kevent(struct thread *td, struct file *epfp, > > /* flags related to how event is registered */ > if ((levents & LINUX_EPOLLONESHOT) != 0) >- *kev_flags |= EV_ONESHOT; >+ *kev_flags |= EV_DISPATCH; > if ((levents & LINUX_EPOLLET) != 0) > *kev_flags |= EV_CLEAR; > if ((levents & LINUX_EPOLLERR) != 0) >@@ -501,16 +501,17 @@ linux_epoll_ctl(struct thread *td, struct linux_epoll_ctl_args *args) > case LINUX_EPOLL_CTL_ADD: > /* > * kqueue_register() return ENOENT if event does not exists >- * and the EV_ADD flag is not set. >+ * and the EV_ADD flag is not set. Reset EV_ENABLE flag to >+ * avoid accidental activation of fired oneshot events. > */ >- kev[0].flags &= ~EV_ADD; >+ kev[0].flags &= ~(EV_ADD | EV_ENABLE); > error = kqfd_register(args->epfd, &kev[0], td, M_WAITOK); > if (error != ENOENT) { > error = EEXIST; > goto leave0; > } > error = 0; >- kev[0].flags |= EV_ADD; >+ kev[0].flags |= (EV_ADD | EV_ENABLE); > break; > > case LINUX_EPOLL_CTL_DEL:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 240590
: 207708 |
207916
|
207926