Page MenuHomeFreeBSD

gctl_get_geom: Skip validation of g_class.

Authored by delphij on Jul 26 2020, 6:03 AM.



The caller from kernel is expected to provide an valid g_class
pointer, instead of traversing the global g_class list, just
assert that it is not NULL and use it directly instead.

MFC after: 2 weeks

Diff Detail

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

delphij created this revision.

Makes sense. Not sure why it was made so paranoid.

This revision is now accepted and ready to land.Jul 26 2020, 7:45 PM

It was primarily made paranoid because GEOM went into the kernel during a very turbulent period in terms of locking, and because some of the compatibility shims necessary to keep systems working were ... "interesting".

This revision was automatically updated to reflect the committed changes.