Date: Mon, 19 Dec 2016 09:44:14 +0000 (UTC) From: Hans Petter Selasky <hselasky@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: r310248 - stable/11/sys/netgraph Message-ID: <201612190944.uBJ9iE4m086482@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Mon Dec 19 09:44:14 2016 New Revision: 310248 URL: https://svnweb.freebsd.org/changeset/base/310248 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/11/sys/netgraph/ng_base.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netgraph/ng_base.c ============================================================================== --- stable/11/sys/netgraph/ng_base.c Mon Dec 19 09:42:43 2016 (r310247) +++ stable/11/sys/netgraph/ng_base.c Mon Dec 19 09:44:14 2016 (r310248) @@ -3825,7 +3825,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); } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612190944.uBJ9iE4m086482>