git: 38803b17b28c - stable/13 - mbuf: make M_ASSERT_NO_SND_TAG() as strict as other similar asserts

From: Hans Petter Selasky <hselasky_at_FreeBSD.org>
Date: Fri, 25 Feb 2022 09:58:22 UTC
The branch stable/13 has been updated by hselasky:

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

commit 38803b17b28cb987506c3dbbd099a052ea91d9ef
Author:     Hans Petter Selasky <hselasky@FreeBSD.org>
AuthorDate: 2022-02-25 09:57:10 +0000
Commit:     Hans Petter Selasky <hselasky@FreeBSD.org>
CommitDate: 2022-02-25 09:57:10 +0000

    mbuf: make M_ASSERT_NO_SND_TAG() as strict as other similar asserts
    
    Fixes:  17cbcf33c3b6
    
    (cherry picked from commit f59fa112807b85abbd070c8ef6b1ac6e70207acb)
---
 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 427c6c9b36e5..6fd83b165752 100644
--- a/sys/sys/mbuf.h
+++ b/sys/sys/mbuf.h
@@ -1111,7 +1111,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__))