Public bug reported:

Hi, I have reported on Dracut GitHub the following issue .

After upgrading to Ubuntu 18.04 (Linuxmint 19) dracut does not add
additional drivers.

After a lot of investigation I found a problem into the libkmod.

Here is a sample code to replicate the issue:

#include <libkmod.h>
#include <stdio.h>

#define _cleanup_(x) __attribute__((cleanup(x)))

static inline void kmod_module_unref_listp(struct kmod_list **p) {
        if (*p)

#define _cleanup_kmod_module_unref_list_

static inline void kmod_module_info_free_listp(struct kmod_list **p) {
        if (*p)

#define _cleanup_kmod_module_info_free_list_

static inline void kmod_unrefp(struct kmod_ctx **p) {

#define _cleanup_kmod_unref_ _cleanup_(kmod_unrefp)

int main(int argc, char** argv) {
    _cleanup_kmod_unref_ struct kmod_ctx *ctx = NULL;
    _cleanup_kmod_module_unref_list_ struct kmod_list *list = NULL;
    int err;

    //char alias[2048]    = "cryptd";
    char alias[2048]    = "ahci cryptd";

    char kerneldir[256] = "/lib/modules/4.15.0-24-generic/";

    printf("libkmod tester...\n");

    ctx = kmod_new(kerneldir, NULL);
    err = kmod_module_new_from_lookup(ctx, alias, &list);

    if (err < 0) {
        printf("Error (%d) looking for aliases \"%s\"\n.", err, alias);
        return 1;

    printf("Got list pointer 0x%lx .\n.", (unsigned long)(void *)list);

    return 0;

And here the script to build and run it:


CUR_DIR=$(dirname $0)

gcc -Wall *.c -lkmod -o ${EXE_NAME} && \

Antonio Petricca

lsb_release -rd

Description:    Linux Mint 19 Tara
Release:        19

apt-cache policy libkmod2 

  Installed: 24-1ubuntu3
  Candidate: 24-1ubuntu3
  Version table:
 *** 24-1ubuntu3 500
        500 bionic/main amd64 Packages
        100 /var/lib/dpkg/status

** Affects: man-db (Ubuntu)
     Importance: Undecided
         Status: New

** Attachment added: "kmod-tester.c"

You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

  Additional LKM not added after upgrading to Ubuntu 18.04 (maybe be a
  bug in "libkmod")

To manage notifications about this bug go to:

ubuntu-bugs mailing list

Reply via email to