]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Lock the knlist before releasing the in-flux state in knote_fork().
authormarkj <markj@FreeBSD.org>
Sat, 24 Nov 2018 16:41:29 +0000 (16:41 +0000)
committermarkj <markj@FreeBSD.org>
Sat, 24 Nov 2018 16:41:29 +0000 (16:41 +0000)
commit01ec130dc70f2cf38df96d55dde5cb7445d43cca
treeee5518667d6d447d4a9d7488d7f4d63606963e2b
parent4d29b0cdced68de3469dc953b929d7f4b987c73d
Lock the knlist before releasing the in-flux state in knote_fork().

Otherwise there is a window, before iteration is resumed, during which
the knote may be freed.  The in-flux state ensures that the knote will
not be removed from the knlist while locks are dropped.

PR: 228858
Reviewed by: kib
Tested by: pho
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D18316
sys/kern/kern_event.c