Page MenuHomeFreeBSD

kobj: Use M_WAITOK in kobj_init
ClosedPublic

Authored by jhb on Fri, Apr 24, 8:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, May 19, 9:49 AM
Unknown Object (File)
Sun, May 17, 3:41 AM
Unknown Object (File)
Thu, May 14, 11:05 AM
Unknown Object (File)
Thu, May 14, 9:23 AM
Unknown Object (File)
Thu, May 14, 3:46 AM
Unknown Object (File)
Wed, May 13, 12:23 AM
Unknown Object (File)
Mon, May 11, 12:29 PM
Unknown Object (File)
Fri, May 8, 10:49 AM
Subscribers

Details

Summary

Blocking allocation is safe in all of the current callers of kobj_init
(most of them do a M_WAIT malloc of the structure passed as the first
argument to kobj_init just before calling it). kobj_init doesn't
return an error code but instead panics if the nested malloc in
kobj_class_compile1 fails, so using M_WAITOK here is more robust.

Diff Detail

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