problems with modprobe on kernel 2.4

Guenter lists at gknw.net
Wed Apr 1 22:50:23 UTC 2009


Hi Denys,
Guenter schrieb:
> attached patch is a diff -u against modutils-24.c from current svn
> trunk; it does not yet patch obj_load_progbits() since there another
> function for loading is used, and was unsure if I can replace there in
> same way as I did in obj_load(); also I want to hear your comments first
> if my patch is what you expect to see...
seems its needed to free m_image finally, or? I forgot in my patch...

but while reading through the code here some other observasions/questions:

    uname(&uts);
is called always directly at beginning although the uts struct is only
used within '#if ENABLE_FEATURE_INSMOD_VERSION_CHECKING/#endif' --
shouldnt we move it just inside the #if block?

I think same applies to m_has_modinfo too:
    m_has_modinfo = (get_modinfo_value(f, "kernel_version") != NULL);
is just before the #if block where it is used...

if the feature ENABLE_FEATURE_INSMOD_VERSION_CHECKING is disabled then
these calls are wasted cpu cycles...

Guen.



More information about the busybox mailing list