Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 07 Apr 2024 13:40:59 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 278234] linsysfs assumes pci domain 0000
Message-ID:  <bug-278234-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D278234

            Bug ID: 278234
           Summary: linsysfs assumes pci domain 0000
           Product: Base System
           Version: 15.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: zeev@amazon.com

When booting on a system with 2 pci domains (3 and 11) and linux compatibil=
ity
layer enabled on arm64 coherent system,=20
crash was observed with the following signature:

Mounting local filesystems:.M
panic: pfs_add_node(): homonymous siblingsM
cpuid =3D 150M
time =3D 1711898170M
KDB: stack backtrace:M
db_trace_self() at db_trace_selfM
db_trace_self_wrapper() at db_trace_self_wrapper+0x38M
vpanic() at vpanic+0x1a4M
panic() at panic+0x48M
pfs_add_node() at pfs_add_node+0x16cM
pfs_create_dir() at pfs_create_dir+0xc0M
linsysfs_run_bus() at linsysfs_run_bus+0x36cM
linsysfs_run_bus() at linsysfs_run_bus+0x23cM
linsysfs_run_bus() at linsysfs_run_bus+0x23cM
linsysfs_run_bus() at linsysfs_run_bus+0x23cM
linsysfs_run_bus() at linsysfs_run_bus+0x23cM
linsysfs_run_bus() at linsysfs_run_bus+0x23cM
linsysfs_init() at linsysfs_init+0x1b4M
pfs_init() at pfs_init+0xb0M
vfs_modevent() at vfs_modevent+0x368M
module_register_init() at module_register_init+0xb4M
linker_load_module() at linker_load_module+0xac8M
kern_kldload() at kern_kldload+0x190M
sys_kldload() at sys_kldload+0x64M
do_el0_sync() at do_el0_sync+0x59cM
handle_el0_sync() at handle_el0_sync+0x48M
--- exception, esr 0x56000000M
KDB: enter: panicM
[ thread pid 115 tid 101679 ]M
Stopped at      kdb_enter+0x4c: str     xzr, [x19, #1408]M

This is caused by sys/compat/linsysfs/linsysfs.c:linsysfs_init() hardcoding=
 pci
domain 0:

...
        /* /sys/devices/... */
        dir =3D pfs_create_dir(root, "devices", NULL, NULL, NULL, 0);
        pci =3D pfs_create_dir(dir, "pci0000:00", NULL, NULL, NULL, 0);

        devclass =3D devclass_find("root");
        if (devclass =3D=3D NULL) {
                return (0);
        }

        dev =3D devclass_get_device(devclass, 0);
        linsysfs_run_bus(dev, pci, scsi, chardev, drm, "/pci0000:00", "0000=
");
...

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-278234-227>