From nobody Thu May 23 05:37:28 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 4VlH4S5K72z5HB31; Thu, 23 May 2024 05:37:28 +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 4VlH4S2Y3Xz4Pq2; Thu, 23 May 2024 05:37:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716442648; 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=1Ms0wZdFii87NsgO0/fqyUUXKvS9QqD0xn2ezWMTSJk=; b=d29pZLJMbkGmDANmCGuUEKVQaH0qZ497rdrnJDZegOrO9MowEpxvXYzGx3cmYW5qJJjSKS rWkfiFmjnI+EQgLKg8GjdvTIc8SKtR46a8cL/GklaGsfkY+WkrI1tng4ZGH4kMrycXKGKt M+Z8hpHNnzuUueOlmVUSfV/q4lmGUcSjFQ9KucVIwL/PnzxrlvuOWDekIQYv0yNK6vf5ne N1gxfnLa7OH2H2X3u/KAdalBL8cBbXzRQRGaxHuatA12LBwD3c4IeI/ruGVnW7S1ptMO+2 JLyBG97x8rrpx5biguMIgY20ML2UANgfMuYH1CK9T0ijbAs1qcretk29TnPfZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716442648; a=rsa-sha256; cv=none; b=PkM5cxMBTMM0DtwE0qNwOVG/wYR6jJ8tfI8AOZKSYKyVDwLuzQF8xqA13lbbRkrqNCX+H/ g+4fthhO0GpdNK3WBbiBGQt8lBilmmwhrt1KYoVyXaxvzoSQ/j4vORrDscM+ZyYNHsP3mz 2IOtQAmSe80ltrIufLX7kwxpNtJpHPgHkMg07RNPlxOpprMd2cUETDIrBak38cKvYtvpZk irJjNjxrU5DZ8Vzm1hfD94yZIPT77GMCuCMHz+N3kupkjyc1+VPCWKhku/7jC1Bn04ywSh P47xagGisOhxPiwSyAy1S9MnDgvmkIt9aKD2kUMPGdQk7+6G0FwX4w4ylQlCVg== 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=1716442648; 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=1Ms0wZdFii87NsgO0/fqyUUXKvS9QqD0xn2ezWMTSJk=; b=CcJvhbtgfVhN0AScyBtDiVdsci62Dim3D3ptoWKCZnSjC+/7Usgc2Z8srm16pocWQmrrAE DC+eZ5HGV/gqfUz4k0XFzYIxX4lSFpHBjeweVvrF/gUlmgVk7PhEEqxYGDOOQbq/lJsd+E 17JkBL6QvJk0OU0rIKFJVOM6Z+FV1t8dl+0Ukv8+N5RoNezgAJrEJTnXL09zHfy+rQ4P3o ivNRHTxE9iG/OSU2wH9HRZ2sAgHij+UO81lxPik6f9bz7j3Jkq1L4mRLmkq+XA8Syo/lNz v60o2cZjS3mWfH651OYOIK1ZXXz800MYqeygIgnx9ObwVJ1TxTEr3jQ/MWdtuw== 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 4VlH4S273bzcd1; Thu, 23 May 2024 05:37:28 +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 44N5bS5Q048006; Thu, 23 May 2024 05:37:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44N5bSTL048003; Thu, 23 May 2024 05:37:28 GMT (envelope-from git) Date: Thu, 23 May 2024 05:37:28 GMT Message-Id: <202405230537.44N5bSTL048003@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: cf879fdb4820 - releng/14.1 - 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/releng/14.1 X-Git-Reftype: branch X-Git-Commit: cf879fdb482034f73150fd47aed60ff6e57110f8 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by zec: URL: https://cgit.FreeBSD.org/src/commit/?id=cf879fdb482034f73150fd47aed60ff6e57110f8 commit cf879fdb482034f73150fd47aed60ff6e57110f8 Author: Marko Zec AuthorDate: 2024-05-07 15:22:00 +0000 Commit: Marko Zec CommitDate: 2024-05-23 04:28:02 +0000 fib_dxr: KASSERTs for chasing NULL ptr and runaway refcount suspects MFC after: 1 week Approved by: re (cperciva) (cherry picked from commit 52075e4cfabc30d08605ec296b2b374d61e2e2bb) --- 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 69332b859099..8b1e92d01d35 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++) {