FreeBSD Bugzilla – Attachment 178123 Details for
Bug 214923
kqueue hangs with busy loop
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Do not clear KN_INFLUX when note is in flux during scan.
1.patch (text/plain), 862 bytes, created by
Konstantin Belousov
on 2016-12-19 20:56:00 UTC
(
hide
)
Description:
Do not clear KN_INFLUX when note is in flux during scan.
Filename:
MIME Type:
Creator:
Konstantin Belousov
Created:
2016-12-19 20:56:00 UTC
Size:
862 bytes
patch
obsolete
>diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c >index b734cf271bc..34dc56e2b3c 100644 >--- a/sys/kern/kern_event.c >+++ b/sys/kern/kern_event.c >@@ -2006,6 +2007,7 @@ knote(struct knlist *list, long hint, int lockflags) > struct kqueue *kq; > struct knote *kn, *tkn; > int error; >+ bool own_influx; > > if (list == NULL) > return; >@@ -2036,11 +2038,14 @@ knote(struct knlist *list, long hint, int lockflags) > */ > KQ_UNLOCK(kq); > } else if ((lockflags & KNF_NOKQLOCK) != 0) { >- kn->kn_status |= KN_INFLUX; >+ own_influx = (kn->kn_status & KN_INFLUX) == 0; >+ if (own_influx) >+ kn->kn_status |= KN_INFLUX; > KQ_UNLOCK(kq); > error = kn->kn_fop->f_event(kn, hint); > KQ_LOCK(kq); >- kn->kn_status &= ~KN_INFLUX; >+ if (own_influx) >+ kn->kn_status &= ~KN_INFLUX; > if (error) > KNOTE_ACTIVATE(kn, 1); > KQ_UNLOCK_FLUX(kq);
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 214923
: 178123