Andreas Gruenbacher f54f9d5368 gfs2: Fix NULL pointer dereference in gfs2_log_flush
[ Upstream commit 35264909e9d1973ab9aaa2a1b07cda70f12bb828 ]

In gfs2_jindex_free(), set sdp->sd_jdesc to NULL under the log flush
lock to provide exclusion against gfs2_log_flush().

In gfs2_log_flush(), check if sdp->sd_jdesc is non-NULL before
dereferencing it.  Otherwise, we could run into a NULL pointer
dereference when outstanding glock work races with an unmount
(glock_work_func -> run_queue -> do_xmote -> inode_go_sync ->
gfs2_log_flush).

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-07-05 09:38:00 +02:00
..
2024-01-10 09:36:40 -08:00
2024-03-25 10:53:39 -07:00
2023-11-07 11:54:17 -08:00
2024-01-10 10:17:23 -08:00
2024-05-30 09:44:24 +02:00
2023-08-02 09:13:09 -06:00
2024-01-10 09:36:40 -08:00
2023-11-07 11:54:17 -08:00
2023-12-18 14:24:33 +01:00
2023-11-07 11:54:17 -08:00
2023-11-07 11:54:17 -08:00