Re: Problem with MODULE_SIG=y

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Wed, Jun 15, 2016 at 05:22:23PM CEST, idosch@xxxxxxxxxx wrote:
>Wed, Jun 15, 2016 at 06:15:29PM IDT, labbott@xxxxxxxxxx wrote:
>>On 06/15/2016 02:55 AM, Ido Schimmel wrote:
>>> Hi,
>>>
>>> I work on a driver (drivers/net/ethernet/mellanox/mlxsw) that is made up
>>> of three modules: mlxsw_pci, mlxsw_core and a third module that is
>>> loaded by mlxsw_core according to the probed PCI device ID via
>>> request_module(). However, this function fails with rawhide kernels
>>> during boot.
>>>
>>> While debugging this, I found out that if I build the kernel myself with
>>> the exact same config, but set CONFIG_MODULE_SIG=n, then everything is
>>> fine. In addition, when modprobing mlxsw_pci myself all the modules are
>>> successfully loaded.
>>>
>>> Any ideas how this can be solved? Did anyone else bump into this
>>> problem?
>>>
>>> Thanks.
>>>
>>
>>Can you share kernel logs showing the error?
>
>The only error in the log is the one from the driver:
>
>mlxsw_pci 0000:03:00.0: cannot register bus device
>mlxsw_pci: probe of 0000:03:00.0 failed with error -22

Laura, note that this is because module mlxsw_spectrum failed to load in
this function:

static struct mlxsw_driver *mlxsw_core_driver_get(const char *kind)
{
        struct mlxsw_driver *mlxsw_driver;

        spin_lock(&mlxsw_core_driver_list_lock);
        mlxsw_driver = __driver_find(kind);
        if (!mlxsw_driver) {
                spin_unlock(&mlxsw_core_driver_list_lock);
                request_module(MLXSW_MODULE_ALIAS_PREFIX "%s", kind);
                spin_lock(&mlxsw_core_driver_list_lock);
                mlxsw_driver = __driver_find(kind);
        }
        if (mlxsw_driver) {
                if (!try_module_get(mlxsw_driver->owner))
                        mlxsw_driver = NULL;
        }

        spin_unlock(&mlxsw_core_driver_list_lock);
        return mlxsw_driver;
}

Here, "request_module" won't load the mlxsw_spectrum module. But this issue
happens only during the boot time.

If you try to "modprobe mlxsw_pci" by hand later on, all works fine.

This is quite odd.
_______________________________________________
kernel mailing list
kernel@xxxxxxxxxxxxxxxxxxxxxxx
https://lists.fedoraproject.org/admin/lists/kernel@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux