erofs-utils: lib: check NULL from erofs_rebuild_get_dentry()
erofs_rebuild_get_dentry() returns NULL when the input path
normalizes to nothing (".", "/", "//", or paths that collapse via
".."). The tar hardlink branch and the S3 import loop only check
IS_ERR() and then dereference the result.
Reject a hardlink target that resolves to root with -EISDIR, and
treat a root-normalized S3 key as the root inode itself.
Fixes: 95d315fd7958 ("erofs-utils: introduce tarerofs")
Fixes: 29728ba8f6f6 ("erofs-utils: mkfs: support EROFS meta-only image generation from S3")
Signed-off-by: Vansh Choudhary <ch@vnsh.in>
Link: https://lore.kernel.org/r/20260420174752.50132-1-ch@vnsh.in
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
2 files changed