svn commit: r302242 - in head/sys: kern sys
Konstantin Belousov
kib at FreeBSD.org
Mon Jun 27 23:34:54 UTC 2016
Author: kib
Date: Mon Jun 27 23:34:53 2016
New Revision: 302242
URL: https://svnweb.freebsd.org/changeset/base/302242
Log:
Fix userspace build after r302235: do not expose bool field of the
structure, change it to int.
The real fix is to sanitize user-visible definitions in sys/event.h,
e.g. the affected struct knlist is of no use for userspace programs.
Reported and tested by: jkim
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Approved by: re (gjb)
Modified:
head/sys/kern/kern_event.c
head/sys/sys/event.h
Modified: head/sys/kern/kern_event.c
==============================================================================
--- head/sys/kern/kern_event.c Mon Jun 27 22:21:29 2016 (r302241)
+++ head/sys/kern/kern_event.c Mon Jun 27 23:34:53 2016 (r302242)
@@ -2204,7 +2204,7 @@ knlist_init(struct knlist *knl, void *lo
else
knl->kl_assert_unlocked = kl_assert_unlocked;
- knl->kl_autodestroy = false;
+ knl->kl_autodestroy = 0;
SLIST_INIT(&knl->kl_list);
}
@@ -2255,7 +2255,7 @@ knlist_detach(struct knlist *knl)
{
KNL_ASSERT_LOCKED(knl);
- knl->kl_autodestroy = true;
+ knl->kl_autodestroy = 1;
if (knlist_empty(knl)) {
knlist_destroy(knl);
free(knl, M_KQUEUE);
Modified: head/sys/sys/event.h
==============================================================================
--- head/sys/sys/event.h Mon Jun 27 22:21:29 2016 (r302241)
+++ head/sys/sys/event.h Mon Jun 27 23:34:53 2016 (r302242)
@@ -159,7 +159,7 @@ struct knlist {
void (*kl_assert_locked)(void *);
void (*kl_assert_unlocked)(void *);
void *kl_lockarg; /* argument passed to lock functions */
- bool kl_autodestroy;
+ int kl_autodestroy;
};
More information about the svn-src-head
mailing list