Page MenuHomeFreeBSD

geli: Allocate a UMA pool earlier
ClosedPublic

Authored by oshogbo on Thu, May 16, 8:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, May 26, 9:08 AM
Unknown Object (File)
Sat, May 25, 7:03 PM
Unknown Object (File)
Sat, May 25, 7:03 PM
Unknown Object (File)
Sat, May 25, 7:03 PM
Unknown Object (File)
Sat, May 25, 7:03 PM
Unknown Object (File)
Fri, May 24, 12:57 AM
Unknown Object (File)
Wed, May 22, 2:36 AM
Unknown Object (File)
Tue, May 21, 7:07 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.Thu, May 16, 8:57 PM
This revision was automatically updated to reflect the committed changes.