The dnode_get_path() traverses dnode structures to locate the dnode leaf
of a given path. When the leaf is a symlink to another path, it restarts
the traversal either from root or from a different path. In such cases,
dn_new must be re-initialized
Passes "make check".
Fixes: CID 86750
Signed-off-by: Jagannathan Raman <jag.raman@oracle.com>
Reviewed-by: Ross Philipson <ross.philipson@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub_strlen (oldpath) + 1);
grub_free (oldpathbuf);
+
+ /* Restart dnode walk using path of symlink. */
if (path[0] != '/')
{
dn_new = dnode_path;
dnode_path = dn_new->next;
grub_free (dn_new);
}
+ dn_new = dnode_path;
}
if (dnode_path->dn.dn.dn_bonustype == DMU_OT_SA)
{
grub_strlen (oldpath) + 1);
grub_free (oldpathbuf);
+
+ /* Restart dnode walk using path of symlink. */
if (path[0] != '/')
{
dn_new = dnode_path;
dnode_path = dn_new->next;
grub_free (dn_new);
}
+ dn_new = dnode_path;
}
}
}