Select Your Language

Infrastructure and Management

Cloud Computing

Storage

Runtimes

Integration and Automation

  • Comments
  • Difficulty loading updated driver (loadable kernel module)

    Posted on

    I have custom pcie hardware and driver. When I remake the driver, I'm having difficulty loading the correct, newly built driver (loadable kernel module).

    Specifically, the only way I've been able to make sure the correct, newly built module was loaded has been to reboot my RHEL 7 after the build. I would prefer to be able to remove and re-insert it.

    Note that this module consists of two separate .ko files, call them funkyone.ko and funkytwo.ko. Note that funkytwo.ko has some EXPORT_SYMBOL functions that are called by funkyone.ko. If they aren't already loaded, I use "sudo modprobe funkyone", which loads not only funkyone.ko but also the funkytwo.ko referenced by funkyone.ko.

    Note that part of the build process is to "install" them to the /lib/modules/.../kernel/drivers/char folder.

    Note that when the physical computer is rebooted, both modules are automatically loaded. So if I do a make with install, and then reboot, the subsequent behavior under test confirms that the loaded modules are indeed the recently built ones.

    HOWEVER... If I do "sudo rmmod funkyone" followed by "lsmod | grep funky", I see that both have been removed. I then make and install after the rmmod. I then do "sudo modprobe funkyone" again, expecting the newly built .ko's to be loaded. However, testing behavior shows me that they are NOT, and that the loaded modules are the one prior to the make and install. This turns out to be the case even if I first manually delete them from the /lib/modules/.../kernel/drivers/char folder and do a make clean, which should leave no old copies around to have been loaded. It's as if the rmmod, proven to work by by lsmod, isn't really removing them but leaving them on the sidelines cached somewhere to be reloaded.

    Note, I've tried insmod instead of modprobe, with the same results.

    Help, please!

    by

    points

    Responses

    Red Hat LinkedIn YouTube Facebook X, formerly Twitter

    Quick Links

    Help

    Site Info

    Related Sites

    © 2026 Red Hat