Page MenuHomeFreeBSD

geli: Allocate a UMA pool earlier
ClosedPublic

Authored by oshogbo on May 16 2024, 8:18 PM.
Tags
None
Referenced Files
F102686292: D45225.diff
Fri, Nov 15, 8:59 PM
Unknown Object (File)
Fri, Nov 8, 1:23 AM
Unknown Object (File)
Fri, Nov 8, 1:22 AM
Unknown Object (File)
Thu, Oct 17, 10:20 PM
Unknown Object (File)
Thu, Oct 17, 6:30 AM
Unknown Object (File)
Oct 16 2024, 4:25 AM
Unknown Object (File)
Oct 15 2024, 1:57 AM
Unknown Object (File)
Oct 11 2024, 10:00 PM
Subscribers

Details

Summary

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>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This skip is not necessary any longer.

Wow. I'm surprised this bug went unnoticed for so long. Can you get the fix into 14.1 ?

This revision is now accepted and ready to land.May 16 2024, 8:57 PM
This revision was automatically updated to reflect the committed changes.