git: 52075e4cfabc - stable/14 - fib_dxr: KASSERTs for chasing NULL ptr and runaway refcount suspects
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 14 May 2024 20:38:55 UTC
The branch stable/14 has been updated by zec: URL: https://cgit.FreeBSD.org/src/commit/?id=52075e4cfabc30d08605ec296b2b374d61e2e2bb commit 52075e4cfabc30d08605ec296b2b374d61e2e2bb 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:32:17 +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++) {