Date: Tue, 25 Feb 2025 15:59:47 +0800 From: Zhenlei Huang <zlei@FreeBSD.org> To: Eugene Grosbein <eugen@FreeBSD.org> Cc: "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org> Subject: Re: git: 93b4a5445658 - main - netgraph: prevent panic with INVARIANTS-enabled kernel Message-ID: <AD0130C9-5FB7-442D-8CBA-4E5F5ADD2C43@FreeBSD.org> In-Reply-To: <202502250722.51P7Mwnr064433@gitrepo.freebsd.org> References: <202502250722.51P7Mwnr064433@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> On Feb 25, 2025, at 3:22 PM, Eugene Grosbein <eugen@FreeBSD.org> = wrote: >=20 > The branch main has been updated by eugen: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D93b4a54456589e78dcd37f2db8333baf= f3f3f0b2 >=20 > commit 93b4a54456589e78dcd37f2db8333baff3f3f0b2 > Author: Eugene Grosbein <eugen@FreeBSD.org> > AuthorDate: 2025-02-25 07:18:29 +0000 > Commit: Eugene Grosbein <eugen@FreeBSD.org> > CommitDate: 2025-02-25 07:22:53 +0000 >=20 > netgraph: prevent panic with INVARIANTS-enabled kernel >=20 > This change makes NG_ABI_VERSION depend on INVARIANTS > in addition to NETGRAPH_DEBUG. >=20 > PR: 257876 Maybe a wrong PR ? The PR 257876 is about port math/deal.ii , I do not see any relationship = between it and netgraph(3) or netgraph(4). Best regards, Zhenlei > MFC-after: 2 weeks > --- > sys/netgraph/netgraph.h | 19 ++++++++++++++----- > 1 file changed, 14 insertions(+), 5 deletions(-) >=20 > 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) >=20 > /* > * 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?AD0130C9-5FB7-442D-8CBA-4E5F5ADD2C43>