opnsense-src/tests/sys/geom/class
Mariusz Zaborski 309946854f geli: allocate a UMA pool earlier
The functions g_eli_init_uma and g_eli_fini_uma are used to trace
the number of devices in GELI. There is an issue where the g_eli_create
function may fail before g_eli_init_uma is called, however
g_eli_fini_uma is still executed in the fail path. This can
incorrectly decrease the device count to zero, potentially leading to
the UMA pool being freed. Accessing the device after the pool has been
freed causes a system panic.

This commit resolves the issue by ensuring devices count is increassed
eariler.

PR:		278828
Reported by:	Andre Albsmeier <mail@fbsd2.e4m.org>
Reviewed by:	asomers
MFC after:	3 days
Approved by:	re (cperciva)
Differential Revision:	https://reviews.freebsd.org/D45225

(cherry picked from commit 4b3141f5d5)
(cherry picked from commit ea5a708625)
2024-05-23 10:07:19 +02:00
..
concat Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
eli geli: allocate a UMA pool earlier 2024-05-23 10:07:19 +02:00
gate Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
mirror Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
multipath Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
nop Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
part Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
raid3 Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
shsec Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
stripe Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
uzip Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
geom_subr.sh Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile.inc Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00