Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Nov 2018 16:57:59 +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-12@freebsd.org
Subject:   svn commit: r341077 - stable/12/sys/kern
Message-ID:  <201811271657.wARGvx6p045493@repo.freebsd.org>

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

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

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

Modified: stable/12/sys/kern/kern_event.c
==============================================================================
--- stable/12/sys/kern/kern_event.c	Tue Nov 27 16:55:24 2018	(r341076)
+++ stable/12/sys/kern/kern_event.c	Tue Nov 27 16:57:59 2018	(r341077)
@@ -603,10 +603,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_leave_flux(kn);
 		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?201811271657.wARGvx6p045493>