Author: andrew
Date: Fri Feb  8 16:18:17 2019
New Revision: 343913
URL: https://svnweb.freebsd.org/changeset/base/343913

Log:
  Fix the spelling of cov_unregister_pc.
  
  When unregistering kcov from the coverage interface we should use the
  unregister function, not the register function.
  
  Sponsored by: DARPA, AFRL

Modified:
  head/sys/kern/kern_kcov.c

Modified: head/sys/kern/kern_kcov.c
==============================================================================
--- head/sys/kern/kern_kcov.c   Fri Feb  8 16:05:38 2019        (r343912)
+++ head/sys/kern/kern_kcov.c   Fri Feb  8 16:18:17 2019        (r343913)
@@ -469,8 +469,8 @@ kcov_ioctl(struct cdev *dev, u_long cmd, caddr_t data,
                KASSERT(active_count > 0, ("%s: Open count is zero", __func__));
                active_count--;
                if (active_count == 0) {
-                       cov_register_pc(&trace_pc);
-                       cov_register_cmp(&trace_cmp);
+                       cov_unregister_pc();
+                       cov_unregister_cmp();
                }
 
                td->td_kcov_info = NULL;
@@ -505,8 +505,8 @@ kcov_thread_dtor(void *arg __unused, struct thread *td
        KASSERT(active_count > 0, ("%s: Open count is zero", __func__));
        active_count--;
        if (active_count == 0) {
-               cov_register_pc(&trace_pc);
-               cov_register_cmp(&trace_cmp);
+               cov_unregister_pc();
+               cov_unregister_cmp();
        }
        td->td_kcov_info = NULL;
        if (info->state != KCOV_STATE_DYING) {
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to