From owner-svn-src-projects@freebsd.org Fri Aug 28 16:09:30 2015 Return-Path: Delivered-To: svn-src-projects@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 178639C5081 for ; Fri, 28 Aug 2015 16:09:30 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 088C48B3; Fri, 28 Aug 2015 16:09:30 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t7SG9TYp054491; Fri, 28 Aug 2015 16:09:29 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t7SG9TIv054490; Fri, 28 Aug 2015 16:09:29 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201508281609.t7SG9TIv054490@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 28 Aug 2015 16:09:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r287261 - projects/hps_head/sys/netinet X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Aug 2015 16:09:30 -0000 Author: hselasky Date: Fri Aug 28 16:09:29 2015 New Revision: 287261 URL: https://svnweb.freebsd.org/changeset/base/287261 Log: Checking the return value of callout_stop() is not enough to decide if a previous callout is still pending for completion or not. Use callout_drain_async() to do this instead. Modified: projects/hps_head/sys/netinet/tcp_timer.c Modified: projects/hps_head/sys/netinet/tcp_timer.c ============================================================================== --- projects/hps_head/sys/netinet/tcp_timer.c Fri Aug 28 15:41:09 2015 (r287260) +++ projects/hps_head/sys/netinet/tcp_timer.c Fri Aug 28 16:09:29 2015 (r287261) @@ -934,7 +934,7 @@ tcp_timer_stop(struct tcpcb *tp, uint32_ } if (tp->t_timers->tt_flags & timer_type) { - if (callout_stop(t_callout) && + if (callout_drain_async(t_callout, f_callout, tp) == 0 && (tp->t_timers->tt_flags & f_reset)) { tp->t_timers->tt_flags &= ~(timer_type | f_reset); } else { @@ -948,7 +948,6 @@ tcp_timer_stop(struct tcpcb *tp, uint32_ * classical check for callout reset/stop events: * callout_pending() || !callout_active() */ - callout_reset(t_callout, 1, f_callout, tp); } } }