Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F176297416
D59952.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
888 B
Referenced Files
None
Subscribers
None
D59952.diff
View Options
diff --git a/sys/compat/linuxkpi/common/src/linux_radix.c b/sys/compat/linuxkpi/common/src/linux_radix.c
--- a/sys/compat/linuxkpi/common/src/linux_radix.c
+++ b/sys/compat/linuxkpi/common/src/linux_radix.c
@@ -107,10 +107,15 @@
struct radix_tree_node *node;
int height, pos;
- height = 1;
- node = stack[height];
+ /*
+ * Only stack[1 .. root->height - 1] was filled in by the caller, so
+ * the height must be range checked before loading the stack entry.
+ */
+ for (height = 1; height <= root->height - 1; height++) {
+ node = stack[height];
+ if (node == NULL)
+ break;
- while (node && height <= root->height - 1) {
pos = radix_pos(index, height);
if (!tag_get(node, tag, pos))
return;
@@ -118,9 +123,6 @@
tag_clear(node, tag, pos);
if (any_tag_set(node, tag))
return;
-
- height++;
- node = stack[height];
}
if (root_tag_get(root, tag))
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Oct 18, 6:18 PM (20 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39560883
Default Alt Text
D59952.diff (888 B)
Attached To
Mode
D59952: linuxkpi: avoid false KMSAN report
Attached
Detach File
Event Timeline
Log In to Comment