From owner-svn-src-all@freebsd.org Mon Dec 19 09:44:15 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97F2FC86A48; Mon, 19 Dec 2016 09:44:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F91E1E64; Mon, 19 Dec 2016 09:44:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBJ9iEU2086483; Mon, 19 Dec 2016 09:44:14 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBJ9iE4m086482; Mon, 19 Dec 2016 09:44:14 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201612190944.uBJ9iE4m086482@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 19 Dec 2016 09:44:14 +0000 (UTC) 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 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2016 09:44:15 -0000 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); } /*