For example: It crashes instead of cleanly erroring out if there's
a file for which it doesn't have permissions to read (e.g. /etc/gshadow
has mode 000).
Reported-by: Jonathan Lebon <jonathan@jlebon.com>
Fixes: 6a8e395ae4fd ("erofs-utils: fix up root inode for incremental builds")
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20250109050514.3836023-1-hsiangkao@linux.alibaba.com
root = erofs_mkfs_build_tree_from_path(&g_sbi, cfg.c_src_path);
if (IS_ERR(root)) {
err = PTR_ERR(root);
+ root = NULL;
goto exit;
}
}