Wed, Jun 15, 2016 at 05:47:45PM CEST, jwboyer(a)fedoraproject.org wrote:
On Wed, Jun 15, 2016 at 11:29 AM, Jiri Pirko <jiri(a)resnulli.us>
wrote:
> Wed, Jun 15, 2016 at 05:22:23PM CEST, idosch(a)idosch.org wrote:
>>Wed, Jun 15, 2016 at 06:15:29PM IDT, labbott(a)redhat.com 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.
Is mlxsw_pci actually in the initramfs, and is it signed in it?
[root@r-mgtswd-1012 ~]# lsinitrd
/boot/initramfs-4.7.0-0.rc2.git3.2.fc25.x86_64 |grep mlxsw
initramfs-4.7.0-0.rc2.git3.2.fc25.x86_64+debug.img
initramfs-4.7.0-0.rc2.git3.2.fc25.x86_64.img
[root@r-mgtswd-1012 ~]# lsinitrd
/boot/initramfs-4.7.0-0.rc2.git3.2.fc25.x86_64.img |grep mlxsw
drwxr-xr-x 2 root root 0 Jun 14 02:02
usr/lib/modules/4.7.0-0.rc2.git3.2.fc25.x86_64/kernel/drivers/net/ethernet/mellanox/mlxsw
-rw-r--r-- 1 root root 20172 Jun 10 20:43
usr/lib/modules/4.7.0-0.rc2.git3.2.fc25.x86_64/kernel/drivers/net/ethernet/mellanox/mlxsw/mlxsw_core.ko.xz
-rw-r--r-- 1 root root 17888 Jun 10 20:43
usr/lib/modules/4.7.0-0.rc2.git3.2.fc25.x86_64/kernel/drivers/net/ethernet/mellanox/mlxsw/mlxsw_pci.ko.xz
mlxsw_spectrum is not there. That would be a problem. Investigating now.
Thanks!