From nobody Tue May 14 20:38:55 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 4Vf7Vn03Cfz5L03Y; Tue, 14 May 2024 20:38:57 +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 4Vf7Vm0SDmz4Jnn; Tue, 14 May 2024 20:38:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715719136; 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=0Qg0Z9lheMK9xmmSZBIc6rdQUDMkjL+qErjGzuaW1s8=; b=iterge3XLQrxyuceJa3vC4lbrU8yR3rG+pVyosCah45n7YhATsCQdLMfZIezFgzbzetnkG WWmMhH32IY3uTQjK43QjinDjHLWteUH7XkXRfHxg2htZ136yJ0qTvSfNR7mDWO7vRjhstU IzcsI1Ahv3XtEJD6k3PI8Lsf2SEkdnO5nQowzxSbyUhd9Jaopdyoikrf5uZ9iWIRj8dSjN GSGfX94M0KLGaZQRCo04Cy2I1AR9i1XUWVcrK1F7VossCuJqVqmHVwUTS6vuC7q1+RAk0w mCKckrqRX/lmdCWZ7Fgt+VSDSkoBW2jooez3dlksPluQnYxNXg0SJpHIXQKv1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715719136; a=rsa-sha256; cv=none; b=ZSkig2t8WBekNOBiSgU8lC52Tu4mqGgLBczXVFYBVqpZbysEymBIZcODD5v2zTiQ3tBZNO pwG5wiGdXftF0s43zQnHLyJ5dDbKPXs85tPck4FctfITkAYnNY7gj8RDEVdcXRfDLXSwnu 2sQXeBiBEs8sFdwlpU1m5zg+vuhQkHU6Yd6jcd0+u/3CtDjW3ALB6wmPMOwpriIRr+FtME 4zEaItJr8mFthDWIgymL3M4Kl+nFVLX8AfRvKN3uJ7eVwhgUFstPATf66iScCL6PypLYSC gIAukA1MRKOjLID8EiY2GLmPBlBRq6NLWQWnS7BmK/DJDuCATg3yGjQsnJkX7A== 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=1715719136; 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=0Qg0Z9lheMK9xmmSZBIc6rdQUDMkjL+qErjGzuaW1s8=; b=YJcQ29wO4cRfh8tP9WrROLpArsD/xV+E+x/NNveNwaNZN9fs5ihglO7sRbdNNnlIlY2F/H TsBQDo/P0a0dWtn3Ccbgr5I6Jtr+xcqsa9SrfT8GoC53PpkE4LiJcnt3misOL/tfiyZ2Zn DmVKB3NZCmK53fX0Hag/6MAk4nTPYbatGFXDi+fi7s3fYx5BBDmc170GEjYmZ4d0ROPSjI FcxnGei5m6uVbSz+0uQ77dSEahpoRIP+sO20ecN6P0XghH/X1rnTFdMdRuyuzCRwLf8huL x/rxduLgK9eAugGHr4GFr6M5FsgnbeLnqu4oZy8NXg3HFI+gDRbAxRpyF4YPeg== 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 4Vf7Vm01qZzmZy; Tue, 14 May 2024 20:38:56 +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 44EKctdM092439; Tue, 14 May 2024 20:38:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44EKctua092436; Tue, 14 May 2024 20:38:55 GMT (envelope-from git) Date: Tue, 14 May 2024 20:38:55 GMT Message-Id: <202405142038.44EKctua092436@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: 52075e4cfabc - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 52075e4cfabc30d08605ec296b2b374d61e2e2bb Auto-Submitted: auto-generated The branch stable/14 has been updated by zec: URL: https://cgit.FreeBSD.org/src/commit/?id=52075e4cfabc30d08605ec296b2b374d61e2e2bb commit 52075e4cfabc30d08605ec296b2b374d61e2e2bb Author: Marko Zec AuthorDate: 2024-05-07 15:22:00 +0000 Commit: Marko Zec 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++) {