Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Jan 2022 17:42:31 GMT
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: f59fa112807b - main - mbuf: make M_ASSERT_NO_SND_TAG() as strict as other similar asserts
Message-ID:  <202201271742.20RHgV4H007144@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by glebius:

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

commit f59fa112807b85abbd070c8ef6b1ac6e70207acb
Author:     Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2022-01-27 17:41:31 +0000
Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2022-01-27 17:41:31 +0000

    mbuf: make M_ASSERT_NO_SND_TAG() as strict as other similar asserts
    
    Fixes:  17cbcf33c3b6
---
 sys/sys/mbuf.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h
index ebe8ef205055..78b175ebe2c0 100644
--- a/sys/sys/mbuf.h
+++ b/sys/sys/mbuf.h
@@ -1147,7 +1147,7 @@ m_extrefcnt(struct mbuf *m)
 
 /* Check if the supplied mbuf has no send tag, or else panic. */
 #define	M_ASSERT_NO_SND_TAG(m)						\
-	KASSERT((m) == NULL || ((m)->m_flags & M_PKTHDR) == 0 ||	\
+	KASSERT((m) != NULL && (m)->m_flags & M_PKTHDR &&		\
 	       ((m)->m_pkthdr.csum_flags & CSUM_SND_TAG) == 0,		\
 	    ("%s: receive mbuf has send tag!", __func__))
 



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