aboutsummaryrefslogtreecommitdiffstats
path: root/fs/erofs/sysfs.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-11-15 10:30:34 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2022-11-15 10:30:34 -0800
commit81e7cfa3a9eb4ba6993a9c71772fdab21bc5d870 (patch)
tree4bf52ce328bf8cf98d583a0978abc6f7e4234bea /fs/erofs/sysfs.c
parent2632daebafd04746b4b96c2f26a6021bc38f6209 (diff)
parent37020bbb71d911431e16c2c940b97cf86ae4f2f6 (diff)
downloadlinux-81e7cfa3a9eb4ba6993a9c71772fdab21bc5d870.tar.gz
Merge tag 'erofs-for-6.1-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs
Pull erofs fixes from Gao Xiang: "Most patches randomly fix error paths or corner cases in fscache mode reported recently. One fixes an invalid access relating to fragments on crafted images. Summary: - Fix packed_inode invalid access when reading fragments on crafted images - Add a missing erofs_put_metabuf() in an error path in fscache mode - Fix incorrect `count' for unmapped extents in fscache mode - Fix use-after-free of fsid and domain_id string when remounting - Fix missing xas_retry() in fscache mode" * tag 'erofs-for-6.1-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs: erofs: fix missing xas_retry() in fscache mode erofs: fix use-after-free of fsid and domain_id string erofs: get correct count for unmapped range in fscache mode erofs: put metabuf in error path in fscache mode erofs: fix general protection fault when reading fragment
Diffstat (limited to 'fs/erofs/sysfs.c')
-rw-r--r--fs/erofs/sysfs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/erofs/sysfs.c b/fs/erofs/sysfs.c
index 783bb7b21b51..fd476961f742 100644
--- a/fs/erofs/sysfs.c
+++ b/fs/erofs/sysfs.c
@@ -210,14 +210,14 @@ int erofs_register_sysfs(struct super_block *sb)
int err;
if (erofs_is_fscache_mode(sb)) {
- if (sbi->opt.domain_id) {
- str = kasprintf(GFP_KERNEL, "%s,%s", sbi->opt.domain_id,
- sbi->opt.fsid);
+ if (sbi->domain_id) {
+ str = kasprintf(GFP_KERNEL, "%s,%s", sbi->domain_id,
+ sbi->fsid);
if (!str)
return -ENOMEM;
name = str;
} else {
- name = sbi->opt.fsid;
+ name = sbi->fsid;
}
} else {
name = sb->s_id;