Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Aug 2014 09:09:07 GMT
From:      op@FreeBSD.org
To:        svn-soc-all@FreeBSD.org
Subject:   socsvn commit: r272395 - soc2014/op/freebsd-base/sys/kern
Message-ID:  <201408140909.s7E997AN074191@socsvn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: op
Date: Thu Aug 14 09:09:07 2014
New Revision: 272395
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=272395

Log:
  KSP: added critical_{enter,exit} to lf_selfpatch
  
  Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
  
  git: https://github.com/opntr/opBSD/tree/op/gsoc2014/smap+kpatch

Modified:
  soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c

Modified: soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c
==============================================================================
--- soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c	Thu Aug 14 08:42:16 2014	(r272394)
+++ soc2014/op/freebsd-base/sys/kern/kern_selfpatch.c	Thu Aug 14 09:09:07 2014	(r272395)
@@ -134,6 +134,8 @@
 	count = stop - start;
 	DBG("count: %d\n", count);
 
+	critical_enter();
+
 	for (patch = start; patch != stop; patch++) {
 		DBG("apply: %p\n", patch);
 		ret = lf_selfpatch_apply(lf, patch, mod);
@@ -141,6 +143,8 @@
 			return (ret);
 	}
 
+	critical_exit();
+
 #ifdef KSP_DEBUG
 	/*
 	 * when selfpatch does not works, the system should crash



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