diff options
| author | Andrew Price <anprice@redhat.com> | 2018-10-08 07:52:43 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-12-01 09:46:33 +0100 |
| commit | b689a81a4c2ac139a3fdb92b08aab6dd73bc6108 (patch) | |
| tree | a43370d4645a137be9fb82e119ee8f12747fb7e1 /include/linux | |
| parent | 8b97e045bd6d37f96f161e4d371ae174148e1587 (diff) | |
gfs2: Don't leave s_fs_info pointing to freed memory in init_sbd
commit 4c62bd9cea7bcf10292f7e4c57a2bca332942697 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: syzbot+dcb8b3587445007f5808@syzkaller.appspotmail.com
Signed-off-by: Andrew Price <anprice@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
