Skip to content

Commit fe42816

Browse files
committed
Merge tag 'gfs2-for-6.16-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2
Pull gfs2 fix from Andreas Gruenbacher: - Fix a NULL pointer dereference reported by syzbot * tag 'gfs2-for-6.16-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: Don't clear sb->s_fs_info in gfs2_sys_fs_add
2 parents 2619a6d + 9126d27 commit fe42816

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

fs/gfs2/ops_fstype.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,10 @@ static void gfs2_tune_init(struct gfs2_tune *gt)
6464

6565
void free_sbd(struct gfs2_sbd *sdp)
6666
{
67+
struct super_block *sb = sdp->sd_vfs;
68+
6769
free_percpu(sdp->sd_lkstats);
70+
sb->s_fs_info = NULL;
6871
kfree(sdp);
6972
}
7073

@@ -1314,7 +1317,6 @@ static int gfs2_fill_super(struct super_block *sb, struct fs_context *fc)
13141317
iput(sdp->sd_inode);
13151318
fail_free:
13161319
free_sbd(sdp);
1317-
sb->s_fs_info = NULL;
13181320
return error;
13191321
}
13201322

fs/gfs2/sys.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,6 @@ int gfs2_sys_fs_add(struct gfs2_sbd *sdp)
764764
fs_err(sdp, "error %d adding sysfs files\n", error);
765765
kobject_put(&sdp->sd_kobj);
766766
wait_for_completion(&sdp->sd_kobj_unregister);
767-
sb->s_fs_info = NULL;
768767
return error;
769768
}
770769

0 commit comments

Comments
 (0)