From a8b0523ae7f08fb25ed429cc0823b82fe53c4d9d Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Wed, 17 Jul 2013 10:56:21 +0000 Subject: [PATCH] Clear the vnode knotes before destroying vpollinfo. Reported and tested by: Patrick Lamaiziere Sponsored by: The FreeBSD Foundation MFC after: 2 weeks --- sys/kern/vfs_subr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index e64f379bdbdb..e2c28130d59b 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -3455,6 +3455,8 @@ vfs_msync(struct mount *mp, int flags) static void destroy_vpollinfo(struct vpollinfo *vi) { + + knlist_clear(&vi->vpi_selinfo.si_note, 1); seldrain(&vi->vpi_selinfo); knlist_destroy(&vi->vpi_selinfo.si_note); mtx_destroy(&vi->vpi_lock);