Skip to content
Commit 2bdef2b4 authored by Bob Peterson's avatar Bob Peterson Committed by Greg Kroah-Hartman
Browse files

gfs2: bypass signal_our_withdraw if no journal

[ Upstream commit d5bf630f

 ]

Before this patch, function signal_our_withdraw referenced the journal
inode immediately. But corrupt file systems may have some invalid
journals, in which case our attempt to read it in will withdraw and the
resulting signal_our_withdraw would dereference the NULL value.

This patch adds a check to signal_our_withdraw so that if the journal
has not yet been initialized, it simply returns and does the old-style
withdraw.

Thanks, Andy Price, for his analysis.

Reported-by: default avatar <syzbot+50a8a9cf8127f2c6f5df@syzkaller.appspotmail.com>
Fixes: 601ef0d5

 ("gfs2: Force withdraw to replay journals and wait for it to finish")
Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent a602e830
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment