git: f59fa112807b - main - mbuf: make M_ASSERT_NO_SND_TAG() as strict as other similar asserts
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 27 Jan 2022 17:42:31 UTC
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__))