FreeBSD Bugzilla – Attachment 256139 Details for
Bug 267028
kernel panics when booting with both (zfs,ko or vboxnetflt,ko or acpi_wmi.ko) and amdgpu.ko
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch update for comment 298's report
file_267028.txt (text/plain), 2.75 KB, created by
Mark Millard
on 2024-12-25 21:05:22 UTC
(
hide
)
Description:
patch update for comment 298's report
Filename:
MIME Type:
Creator:
Mark Millard
Created:
2024-12-25 21:05:22 UTC
Size:
2.75 KB
patch
obsolete
>diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c >index 5271d002fba4..4dc976813dc3 100644 >--- a/sys/kern/kern_linker.c >+++ b/sys/kern/kern_linker.c >@@ -1475,6 +1475,18 @@ sys_kldsym(struct thread *td, struct kldsym_args *uap) > return (error); > } > >+#define MODLIST_NEWMOD_HIST_SLOTS 256 >+static char const* modlist_newmod_lookup_name= NULL; // NULL: No problem found. >+static int modlist_newmod_hist_pos= MODLIST_NEWMOD_HIST_SLOTS; // First update will wrap to 0 first. >+static int modlist_newmod_tqe_next_changed_at= MODLIST_NEWMOD_HIST_SLOTS; // I.E.: No such found. >+static modlist_t modlist_newmod_tqe_next_newvalue= NULL; // NULL: No such found. >+static struct modlist_newmod_hist_type { >+ modlist_t modAddr; >+ linker_file_t containerAddr; >+ char const* modnameAddr; >+ int version; >+} modlist_newmod_hist[MODLIST_NEWMOD_HIST_SLOTS]; >+ > /* > * Preloaded module support > */ >@@ -1484,6 +1496,20 @@ modlist_lookup(const char *name, int ver) > { > modlist_t mod; > >+ if (modlist_newmod_hist_pos<MODLIST_NEWMOD_HIST_SLOTS) >+ { >+ int modlist_newmod_rescan_start_at = 0; >+ if (16 <= modlist_newmod_hist_pos) modlist_newmod_rescan_start_at= modlist_newmod_hist_pos-16; >+ for (int scan_pos= modlist_newmod_rescan_start_at; scan_pos<modlist_newmod_hist_pos; ++scan_pos) >+ if(modlist_newmod_hist[scan_pos].modAddr->link.tqe_next != modlist_newmod_hist[scan_pos+1].modAddr) >+ { >+ modlist_newmod_lookup_name= name; >+ modlist_newmod_tqe_next_changed_at= scan_pos; >+ modlist_newmod_tqe_next_newvalue= modlist_newmod_hist[scan_pos].modAddr->link.tqe_next; >+ panic("modlist_lookup: a prior tqe_next changed!"); >+ } >+ } >+ > TAILQ_FOREACH(mod, &found_modules, link) { > if (strcmp(mod->name, name) == 0 && > (ver == 0 || mod->version == ver)) >@@ -1521,8 +1547,21 @@ modlist_newmodule(const char *modname, int version, linker_file_t container) > modlist_t mod; > > mod = malloc(sizeof(struct modlist), M_LINKER, M_NOWAIT | M_ZERO); >+ >+ ++modlist_newmod_hist_pos; >+ if (MODLIST_NEWMOD_HIST_SLOTS<=modlist_newmod_hist_pos) modlist_newmod_hist_pos= 0; >+#undef MODLIST_NEWMOD_HIST_SLOTS >+ modlist_newmod_hist[modlist_newmod_hist_pos].modAddr= mod; >+ modlist_newmod_hist[modlist_newmod_hist_pos].containerAddr= container; >+ modlist_newmod_hist[modlist_newmod_hist_pos].modnameAddr= modname; >+ modlist_newmod_hist[modlist_newmod_hist_pos].version= version; >+ > if (mod == NULL) > panic("no memory for module list"); >+ >+ if (mod < (modlist_t)0xfffff80000000100) >+ panic("modlist_newmodule: mod < (modlist_t)PHYS_TO_DMAP(0x100)"); >+ > mod->container = container; > mod->name = modname; > mod->version = version;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 267028
:
237279
|
238024
|
238075
|
238668
|
238802
|
238849
|
238850
|
238886
|
239336
|
239752
|
239967
|
240427
|
240591
|
240622
|
240642
|
240643
|
240683
|
240684
|
240729
|
240731
|
241022
|
241027
|
241046
|
241523
|
241741
|
241750
|
255825
|
256016
|
256017
|
256053
|
256054
|
256064
|
256116
|
256119
|
256120
| 256139 |
256160
|
256193
|
256204
|
256207
|
256220
|
256245
|
256279