[Bug 259748] Loading mlx4en kernel module hangs

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 11 Nov 2021 17:01:56 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=259748

--- Comment #7 from Hans Petter Selasky <hselasky@FreeBSD.org> ---
Comment on attachment 229432
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=229432
procstat -akk run as root

@kib:

The LinuxKPI can load modules inside kldload:

 1050 100580 kldload             -                   mi_switch+0x155
sleepq_switch+0x119 sleepq_catch_signals+0x266 sleepq_wait_sig+0x9 _sleep+0x294
kern_kldload+0xd5 mlx4_request_modules+0x9e mlx4_load_one+0x2f8d
mlx4_init_one+0x4cc linux_pci_attach_device+0x42e device_attach+0x3c1
device_probe_and_attach+0x70 pci_driver_added+0xf3 devclass_driver_added+0x39
devclass_add_driver+0x147 _linux_pci_register_driver+0xcf 

This is a regression after:

commit e266a0f7f001c7886eab56d8c058d92d87010400
Author: Konstantin Belousov <kib@FreeBSD.org>
Date:   Thu May 20 17:50:43 2021 +0300

    kern linker: do not allow more than one kldload and kldunload syscalls
simultaneously

    kld_sx is dropped e.g. for executing sysinits, which allows user
    to initiate kldunload while module is not yet fully initialized.

    Reviewed by:    markj
    Differential revision:  https://reviews.freebsd.org/D30456
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week





Maybe allow recursion here? Or use a taskqueue to load the module?


--HPS

-- 
You are receiving this mail because:
You are the assignee for the bug.