Andrew Price b689a81a4c 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>
2018-12-01 09:46:33 +01:00
..
2014-03-19 15:16:24 +00:00
2015-06-27 09:47:46 -07:00
2018-09-26 08:35:05 +02:00
2014-03-03 13:50:12 +00:00
2018-05-30 07:49:13 +02:00
2015-10-29 12:57:48 -05:00
2015-10-29 12:57:48 -05:00
2017-07-15 11:57:46 +02:00
2015-06-27 09:47:46 -07:00
2013-06-14 11:17:15 +01:00
2013-06-03 14:20:18 -07:00
2015-11-09 15:11:24 -08:00
2014-05-14 10:04:34 +01:00
2015-09-11 12:23:51 -07:00
2015-10-29 12:57:48 -05:00
2018-05-30 07:49:13 +02:00
2015-01-13 10:48:57 +00:00
2018-11-27 16:08:01 +01:00
2015-05-05 13:23:22 -05:00