From nobody Fri Nov 27 14:40:32 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jbbgP2hK3z72F4S for ; Fri, 27 Nov 2026 14:40:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jbbgN6n1hz3R0K for ; Fri, 27 Nov 2026 14:40:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795790433; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tPR/wimh0O0aY/5m8/GKFeeEo8qmsozZFgbANsW9fs4=; b=Oxpsxvk0B4ca6qfaatmA16itIlLEA5MDmBnitTug7X4XUOQi7nZhMtIFEbkM8p8i5VX0DH cuUd3MM3tQOd9N6IW8GgIkbaM+2/VFJbnjDgMe9AcItrpxTFvQEQylchj0KaGK0wyYYTm0 blfggFQU5HXu/23iZYCNIt+eBN5x/X8ojs0XYZ4VOTIUN5pfuJUuG/4dLza0wc4YrGd77w k15G0ObPIKvg4jMHpoOZqjn4DDAtIn20YSwf/6fVE2ddKgY5bdzqVcMvHED2KVce+pDJ0E bvbJn6SbXuEpdpyHakAhkRoSfp3GBu4os5mldKJWBD8K+CumOZ5zqsHAd1WjsA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795790433; b=yOOsfDSkAjzrffsyHrBiZq4hkNkdCWOCR5AIre3orM/AZZ5y7oEgwsX52kmR0WEXIAZN98 Pje31ctTGrMyyaKkobgz/EiTiZIxsocuQb80LePx6pi7sUJ8cSh6RaPo7JqmArqBIkgDFW yCStfOotUv4p0OTV2VBKxwDAwT/E7rQqnV9E6qESk8qCj+q1xXZikcBFTA42DAvP3xmI6I MBLqbbW8hUrHKYk/eNyQB1sbLA3szSGMF9cgn7ifLyRcvGl2AnUpKQ8Ievqa4IdSgjhfSG aiCW7S5HkEJLZXpAwYGUbU/Fuha+zHkQRH4N49aPN08PQYUNAHoIS9MubVWqTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795790432; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tPR/wimh0O0aY/5m8/GKFeeEo8qmsozZFgbANsW9fs4=; b=g98EaeUBUWKnX3ppBQar0A35V+ogP4fq64cI7ZBZD2tIn1W2D208L+YMeaA+MCu3rsGCA5 0SPY6T0Yvv6lQCTjJSxxRdNV8IZgSdlPXiudp6Qlu9+rXwkCJ1pm85Bm2eJ8fAQQPatfXC I5delzFsMRJl8acXrWM+0H+0xiLltBO3LuOy28/+fBC5U0PzIp36LTvEcI0/sXgg2KoBPG 9hZ1bhrFo+VJ3Ho2+UuW8467QTpBt5COIX9tPWxFJ2b83omLoFPD05hxJzEMO2u8J3D9WZ R4z2AtKuMS9idnrh61TyX7olHVMhYVSZmPD8LFCljnfrp2sGnKw7Pzbpguf1bA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jbbgN5zT7z13PG for ; Fri, 27 Nov 2026 14:40:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23c3a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Nov 2026 14:40:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: R. Christian McDonald Subject: git: dd6004c57540 - main - iflib: Drain the receive watchdog callout on detach List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rcm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dd6004c57540842ba9a5cc4eacb7390427ec0e0b Auto-Submitted: auto-generated Date: Fri, 27 Nov 2026 14:40:32 +0000 Message-Id: <6b099660.23c3a.2ff8dc6b@gitrepo.freebsd.org> The branch main has been updated by rcm: URL: https://cgit.FreeBSD.org/src/commit/?id=dd6004c57540842ba9a5cc4eacb7390427ec0e0b commit dd6004c57540842ba9a5cc4eacb7390427ec0e0b Author: R. Christian McDonald AuthorDate: 2026-11-27 14:21:07 +0000 Commit: R. Christian McDonald CommitDate: 2026-11-27 14:21:07 +0000 iflib: Drain the receive watchdog callout on detach Nothing stops ifr_watchdog when an interface goes away. If it is armed when the interface detaches, the callout stays on the callout wheel after iflib_rx_structures_free() has freed the queue containing it, corrupting the wheel, or fires and enqueues a task that has already been detached. The window is small: the callout is armed for one tick, only when a receive buffer refill fails, and the detach has to follow right after. The former iflib_pseudo_deregister() drained the callout until 102540192c71 moved its teardown into iflib_tqg_detach() without the drain, and iflib_device_deregister() never did. Drain it in iflib_tqg_detach(). The callout cannot be rearmed by then: _task_fn_rx() only arms it while the interface is running, and iflib_device_deregister() has already called iflib_stop(), which clears the running state and then drains the receive tasks. Reviewed by: kbowling Fixes: fb1a29b45e8b ("Make sure the so-called end of receive...") MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/90 --- sys/net/iflib.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 205d2ff0d63f..aef6011aaaea 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -5996,6 +5996,7 @@ iflib_tqg_detach(if_ctx_t ctx) taskqgroup_detach(tqg, &txq->ift_task); } for (i = 0, rxq = ctx->ifc_rxqs; i < NRXQSETS(ctx); i++, rxq++) { + callout_drain(&rxq->ifr_watchdog); if (rxq->ifr_task.gt_uniq != NULL) taskqgroup_detach(tqg, &rxq->ifr_task); }