Date: Sat, 12 Apr 2025 22:02:54 GMT From: Eugene Grosbein <eugen@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 59e3dd29ecd3 - stable/14 - netgraph: MFC: prevent panic with INVARIANTS-enabled kernel Message-ID: <202504122202.53CM2siB042981@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=59e3dd29ecd3bf8ec2f2453552773d0525640efe commit 59e3dd29ecd3bf8ec2f2453552773d0525640efe Author: Eugene Grosbein <eugen@FreeBSD.org> AuthorDate: 2025-02-25 07:18:29 +0000 Commit: Eugene Grosbein <eugen@FreeBSD.org> CommitDate: 2025-04-12 22:02:16 +0000 netgraph: MFC: prevent panic with INVARIANTS-enabled kernel This change makes NG_ABI_VERSION depend on INVARIANTS in addition to NETGRAPH_DEBUG. PR: 257876 (cherry picked from commit 93b4a54456589e78dcd37f2db8333baff3f3f0b2) --- sys/netgraph/netgraph.h | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/sys/netgraph/netgraph.h b/sys/netgraph/netgraph.h index e83f61d3f60b..10db352e0fa2 100644 --- a/sys/netgraph/netgraph.h +++ b/sys/netgraph/netgraph.h @@ -69,11 +69,20 @@ * modules. */ #define _NG_ABI_VERSION 12 -#ifdef NETGRAPH_DEBUG /*----------------------------------------------*/ -#define NG_ABI_VERSION (_NG_ABI_VERSION + 0x10000) -#else /* NETGRAPH_DEBUG */ /*----------------------------------------------*/ -#define NG_ABI_VERSION _NG_ABI_VERSION -#endif /* NETGRAPH_DEBUG */ /*----------------------------------------------*/ + +#ifdef NETGRAPH_DEBUG +#define _NG_ABI_PREFIX1 0x10000 +#else +#define _NG_ABI_PREFIX1 0 +#endif + +#ifdef INVARIANTS +#define _NG_ABI_PREFIX2 0x20000 +#else +#define _NG_ABI_PREFIX2 0 +#endif + +#define NG_ABI_VERSION (_NG_ABI_PREFIX1 + _NG_ABI_PREFIX2 + _NG_ABI_VERSION) /* * Forward references for the basic structures so we can
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202504122202.53CM2siB042981>