Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 May 2024 20:39:31 GMT
From:      Marko Zec <zec@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 354fa04f5ea1 - stable/13 - fib_dxr: KASSERTs for chasing NULL ptr and runaway refcount suspects
Message-ID:  <202405142039.44EKdVUt093009@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by zec:

URL: https://cgit.FreeBSD.org/src/commit/?id=354fa04f5ea1dcea904637dd8fb40d7cb8b04525

commit 354fa04f5ea1dcea904637dd8fb40d7cb8b04525
Author:     Marko Zec <zec@FreeBSD.org>
AuthorDate: 2024-05-07 15:22:00 +0000
Commit:     Marko Zec <zec@FreeBSD.org>
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++) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202405142039.44EKdVUt093009>