diff options
| author | Andreas Gruenbacher <agruenba@redhat.com> | 2024-03-11 15:51:59 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-07-05 09:38:00 +0200 |
| commit | f54f9d5368a4e92ede7dd078a62788dae3a7c6ef (patch) | |
| tree | 766277fdac5c86c9cfddeb0ad12607c9d71f4e07 /security | |
| parent | c0d3009668ab23ada0f3716b1db9a741eb11c25e (diff) | |
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>
Diffstat (limited to 'security')
0 files changed, 0 insertions, 0 deletions
