Page MenuHomeFreeBSD

D59952.diff
No OneTemporary

D59952.diff

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

Mime Type
text/plain
Expires
Sun, Oct 18, 9:51 AM (12 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39560883
Default Alt Text
D59952.diff (888 B)

Event Timeline