Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gfs2: Don't leave s_fs_info pointing to freed memory in init_sbd
commit 4c62bd9 upstream. When alloc_percpu() fails, sdp gets freed but sb->s_fs_info still points to the same address. Move the assignment after that error check so that s_fs_info can only point to a valid sdp or NULL, which is checked for later in the error path, in gfs2_kill_super(). Reported-by: [email protected] Signed-off-by: Andrew Price <[email protected]> Signed-off-by: Bob Peterson <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
- Loading branch information