svn commit: r310249 - stable/10/sys/netgraph

Hans Petter Selasky hselasky at FreeBSD.org
Mon Dec 19 09:45:25 UTC 2016


Author: hselasky
Date: Mon Dec 19 09:45:23 2016
New Revision: 310249
URL: https://svnweb.freebsd.org/changeset/base/310249

Log:
  MFC r309404:
  Fix return value from ng_uncallout().
  
  callout_stop() recently started returning -1 when the callout is already
  stopped, which is not handled by the netgraph code. Properly filter
  the return value. Netgraph callers only want to know if the callout
  was cancelled and not draining or already stopped.
  
  Discussed with:		julian, glebius

Modified:
  stable/10/sys/netgraph/ng_base.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netgraph/ng_base.c
==============================================================================
--- stable/10/sys/netgraph/ng_base.c	Mon Dec 19 09:44:14 2016	(r310248)
+++ stable/10/sys/netgraph/ng_base.c	Mon Dec 19 09:45:23 2016	(r310249)
@@ -3823,7 +3823,11 @@ ng_uncallout(struct callout *c, node_p n
 	}
 	c->c_arg = NULL;
 
-	return (rval);
+	/*
+	 * Callers only want to know if the callout was cancelled and
+	 * not draining or stopped.
+	 */
+	return (rval > 0);
 }
 
 /*


More information about the svn-src-all mailing list