[Bug 267028] kernel panics when booting with ZFS and amdgpu.ko (both are required)

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 26 Feb 2023 20:56:08 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=267028

--- Comment #82 from Mark Millard <marklmi26-fbsd@yahoo.com> ---
Using the gdb-based backtrace information:

#8  0xffffffff80be8c5d in modlist_lookup (name=0xfffff80006217400 "acpi_wmi", 
    ver=0) at /usr/src/sys/kern/kern_linker.c:1487

is for the strcmp code line in:

static modlist_t
modlist_lookup(const char *name, int ver)
{
        modlist_t mod;

        TAILQ_FOREACH(mod, &found_modules, link) {
                if (strcmp(mod->name, name) == 0 &&
                    (ver == 0 || mod->version == ver))
                        return (mod);
        }
        return (NULL);
}

We also see that strcmp was called via:

#6  <signal handler called>
#7  strcmp (s1=<optimized out>, s2=<optimized out>)
    at /usr/src/sys/libkern/strcmp.c:46

We also see name was accessible, as shown in the "#8" line above.
We see from #7 that strcmp was considered called, suggesting that
the mod->name of itself did not fail. The implication would be that
that value of name in mod->name was a bad pointer when strcmp tried
to use the value.

Nothing says that mod->name was or should have been for acpi_wmi
at all. The "acpi_wmi" side of the comparison need not be
relevant information. Other backtraces that look similar may
well have a similar status for the name in the right had argument
to the strcmp.

This might be a useful hint to someone with appropriate background
or suggest some way of detecting the bad value in mod->name earlier
when that earlier context might be of more use for investigations.

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