Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Nov 2018 16:59:13 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r341078 - stable/11/sys/kern
Message-ID:  <201811271659.wARGxD64045613@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Tue Nov 27 16:59:12 2018
New Revision: 341078
URL: https://svnweb.freebsd.org/changeset/base/341078

Log:
  MFC r340897:
  Lock the knlist before releasing the in-flux state in knote_fork().
  
  PR:	228858

Modified:
  stable/11/sys/kern/kern_event.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/kern/kern_event.c
==============================================================================
--- stable/11/sys/kern/kern_event.c	Tue Nov 27 16:57:59 2018	(r341077)
+++ stable/11/sys/kern/kern_event.c	Tue Nov 27 16:59:12 2018	(r341078)
@@ -566,10 +566,10 @@ knote_fork(struct knlist *list, int pid)
 			kn->kn_fflags |= NOTE_TRACKERR;
 		if (kn->kn_fop->f_event(kn, NOTE_FORK))
 			KNOTE_ACTIVATE(kn, 0);
+		list->kl_lock(list->kl_lockarg);
 		KQ_LOCK(kq);
 		kn->kn_status &= ~KN_INFLUX;
 		KQ_UNLOCK_FLUX(kq);
-		list->kl_lock(list->kl_lockarg);
 	}
 	list->kl_unlock(list->kl_lockarg);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811271659.wARGxD64045613>