Commit fe428164 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents 2619a6d4 9126d275
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -64,7 +64,10 @@ static void gfs2_tune_init(struct gfs2_tune *gt)

void free_sbd(struct gfs2_sbd *sdp)
{
	struct super_block *sb = sdp->sd_vfs;

	free_percpu(sdp->sd_lkstats);
	sb->s_fs_info = NULL;
	kfree(sdp);
}

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

+0 −1
Original line number Diff line number Diff line
@@ -764,7 +764,6 @@ int gfs2_sys_fs_add(struct gfs2_sbd *sdp)
	fs_err(sdp, "error %d adding sysfs files\n", error);
	kobject_put(&sdp->sd_kobj);
	wait_for_completion(&sdp->sd_kobj_unregister);
	sb->s_fs_info = NULL;
	return error;
}