Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157788647
D35403.id106654.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D35403.id106654.diff
View Options
diff --git a/sys/compat/linuxkpi/common/src/linux_dmi.c b/sys/compat/linuxkpi/common/src/linux_dmi.c
--- a/sys/compat/linuxkpi/common/src/linux_dmi.c
+++ b/sys/compat/linuxkpi/common/src/linux_dmi.c
@@ -77,20 +77,25 @@
static bool
linux_dmi_matches(const struct dmi_system_id *dsi)
{
+ enum dmi_field slot;
int i;
for (i = 0; i < nitems(dsi->matches); i++) {
- if (dsi->matches[i].slot == DMI_NONE)
+ slot = dsi->matches[i].slot;
+ if (slot == DMI_NONE)
break;
+ if (slot >= DMI_STRING_MAX ||
+ dmi_data[slot] == NULL)
+ return (false);
if (dsi->matches[i].exact_match) {
- return (dmi_match(dsi->matches[i].slot,
- dsi->matches[i].substr));
- } else {
- return (strstr(dmi_data[dsi->matches[i].slot],
- dsi->matches[i].substr) != NULL);
+ if (dmi_match(slot, dsi->matches[i].substr))
+ continue;
+ } else if (strstr(dmi_data[slot],
+ dsi->matches[i].substr) != NULL) {
+ continue;
}
+ return (false);
}
-
return (true);
}
diff --git a/sys/sys/param.h b/sys/sys/param.h
--- a/sys/sys/param.h
+++ b/sys/sys/param.h
@@ -76,7 +76,7 @@
* cannot include sys/param.h and should only be updated here.
*/
#undef __FreeBSD_version
-#define __FreeBSD_version 1400059
+#define __FreeBSD_version 1400060
/*
* __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, May 26, 5:13 AM (21 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33524429
Default Alt Text
D35403.id106654.diff (1 KB)
Attached To
Mode
D35403: LinuxKPI: Fix dmi_matches() function
Attached
Detach File
Event Timeline
Log In to Comment