From nobody Tue May 14 20:39:31 2024 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 4Vf7WR5CVHz5L05Q; Tue, 14 May 2024 20:39:31 +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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vf7WR3LLxz4KpN; Tue, 14 May 2024 20:39:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715719171; 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=3wjFgFmanDIJyTQA64rajcmEOfd1XU1lwE7HYUX377g=; b=SYOVvTa5fXJ1ELwgRdjgw2f67gupoz00QLlS/BtWat8XR2gVXZa773wyq9Z7NeTIJZzH4T HLAJ6i/Q/FWSEpc9Uw4LXMDt8PkYZKwgqDGCKM9ixVJHRRKVeXKwTc+RDsvDTRfqr/hW/i FI9esuromT4YuNvcXgtdrqf/4ZvL62dVjCVkVNEh0r2uYwRV83udclV5GQje/wl2sLxMdr mfDyp5alPMuNfoXqvbWB9T4cOQQbW0atZ8oON1TcVdb8fxipaFnhNSpIdhbc+Ti4ivsHm+ wapP6TQwu2ZFIqHGZJLjUlkUM+ihLoesWeV62eJtsxZlyuMgLewbU8uOADxM3A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715719171; a=rsa-sha256; cv=none; b=YyKCOINjannWmlLbg2l5gatmLK0O5I+k7ivpbzLABxp5srHxF8sextQHGk4CaKNfG72jg4 8efIuSJgszuQLD1K1mLLYYiZELBAtZ8Lktm9xla18t/qSlvfeRZ6dNOW/ZLFhyeKL10LiI tKtlkWyX+rtNFsDg9jJSAhnIYvC7FeAzJVkHIQSgPmzctYiV2GMJeU5t6GfSMLdqzZWjGv keAhSjrLQKeuOjMX4FSKKIlyDkUnpFqnFiFlGkgO4Vg52Jjp+wfVWZAriGpDQ6YdnhuReN VjfmJJ1QZBsgb6bMamVaZ6lc4+EjRJuOLaQpEja1KVEPqxFIrPgPSoMCsVqSLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715719171; 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=3wjFgFmanDIJyTQA64rajcmEOfd1XU1lwE7HYUX377g=; b=vh6ZhawJc7sCZvv9/yZVkUbS9SrBGcIDhUHknaEj+WR9vmdK/Eo5jq4RHEEphEEbCZoH7/ aYtryhRu4IrgrD3mA7za8iahi+Kp6hg8aWDD7QT0ZQfBDLgCpzxjW763Z9Dyw7pZ0nh5W0 yeS4JgheKvm/sbewOSKcMBuBcZzEGyr6lDpgqqle9j6lOSh3yJOF/N929ZEfcCx3oyXucZ h/cZizm7YKuxeiwlCRKStzNIGt6VdGBGlfHa1178Du70PcTCod/MkTkUBhNLEjf1XpGnTX m89ns9XDq6x4vWgZWBaA6Cqe75cSBdiGMPOifJkZZ1ZluWrfICku9/U+Qcrdkg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vf7WR2rptzm7b; Tue, 14 May 2024 20:39:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44EKdVcc093012; Tue, 14 May 2024 20:39:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44EKdVUt093009; Tue, 14 May 2024 20:39:31 GMT (envelope-from git) Date: Tue, 14 May 2024 20:39:31 GMT Message-Id: <202405142039.44EKdVUt093009@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Marko Zec Subject: git: 354fa04f5ea1 - stable/13 - fib_dxr: KASSERTs for chasing NULL ptr and runaway refcount suspects List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zec X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 354fa04f5ea1dcea904637dd8fb40d7cb8b04525 Auto-Submitted: auto-generated The branch stable/13 has been updated by zec: URL: https://cgit.FreeBSD.org/src/commit/?id=354fa04f5ea1dcea904637dd8fb40d7cb8b04525 commit 354fa04f5ea1dcea904637dd8fb40d7cb8b04525 Author: Marko Zec AuthorDate: 2024-05-07 15:22:00 +0000 Commit: Marko Zec CommitDate: 2024-05-14 20:35:58 +0000 fib_dxr: KASSERTs for chasing NULL ptr and runaway refcount suspects MFC after: 1 week --- sys/netinet/in_fib_dxr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/netinet/in_fib_dxr.c b/sys/netinet/in_fib_dxr.c index 3b2dc837d50b..5c5311068169 100644 --- a/sys/netinet/in_fib_dxr.c +++ b/sys/netinet/in_fib_dxr.c @@ -1280,6 +1280,9 @@ dxr_change_rib_batch(struct rib_head *rnh, struct fib_change_queue *q, da = dxr->aux; KASSERT(da != NULL, ("%s: NULL dxr->aux", __FUNCTION__)); + KASSERT(da->fd != NULL, ("%s: da->fd %p", __FUNCTION__, da->fd)); + KASSERT(da->refcnt > 0, ("%s: da->refcnt %d", __FUNCTION__, + da->refcnt)); FIB_PRINTF(LOG_INFO, da->fd, "processing %d update(s)", q->count); for (ui = 0; ui < q->count; ui++) {