Disable kpatch.service

To prevent the kernel live patching solution from applying all kernel patch modules globally on subsequent boots, disable the kpatch service.

Before you begin

  • You have root permissions on the system.
  • A live patching package is installed.
  • A kernel patch module is installed and loaded.

Procedure

  1. Verify kpatch.service is enabled.
    # systemctl is-enabled kpatch.service
    enabled
  2. Disable kpatch.service:
    # systemctl disable kpatch.service
    Removed /etc/systemd/system/multi-user.target.wants/kpatch.service.
    • Note that the applied kernel patch module is still loaded:
      # kpatch list
      Loaded patch modules:
      kpatch_6_12_0_1_0_1 [enabled]
      
      Installed patch modules:
      kpatch_6_12_0_1_0_1 (6.12.0.el10_0.x86_64)
  3. Reboot your system.

Results

  • Optional: Verify the status of kpatch.service:
    # systemctl status kpatch.service
    ● kpatch.service - "Apply kpatch kernel patches"
       Loaded: loaded (/usr/lib/systemd/system/kpatch.service; disabled; vendor preset: disabled)
       Active: inactive (dead)

    The example output shows that kpatch.service is disabled. Thereby, the kernel live patching solution is not active.

  • Verify that the kernel patch module has been unloaded:
    # kpatch list
    Loaded patch modules:
    
    Installed patch modules:
    kpatch_6_12_0_1_0_1 (6.12.0.el10_0.x86_64)

    The example output shows that a kernel patch module is still installed but the kernel is not patched.

    Important

    Currently, Red Hat does not support reverting live patches without rebooting your system. In case of any issues, contact our support team.