[PATCH] Dynamic kernel environment support (kgetenv() and friends), ACPI quirks
Thomas E. Spanjaard
tgen at netphreax.net
Sat Jan 13 12:27:57 PST 2007
Thomas E. Spanjaard wrote:
Matthew Dillon wrote:
* kenv_uninit() is holding a spin lock across a kfree(), which is
not legal. Of course, insofar as I can tell, kenv_uninit() will
never run since it is a SYSUNINIT in a mandatry kernel module,
so you could probably remove the whole routine and remove the
SYSUNINIT :-).
Yeah, I should just set kenv_isdynamic=0 right after locking, then
unlocking again, which would be sufficient.
Scratch that, there's always the possibility some other code is spinning
on the lock while we set kenv_isdynamic to 0, e.g. in ksetenv() there's
a large enough window. First set kenv_isdynamic to 0 (possibly with
mplock held), spin on the lock to make sure all other threads are done
with whatever they were doing while holding the lock, unlock, then free
all stuff. But it doesn't matter ;).
Cheers,
--
Thomas E. Spanjaard
tgen at netphreax.net
Attachment:
signature.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00009.pgp
Type: application/octet-stream
Size: 186 bytes
Desc: "Description: OpenPGP digital signature"
URL: <http://lists.dragonflybsd.org/pipermail/kernel/attachments/20070113/2595d69f/attachment-0020.obj>
More information about the Kernel
mailing list