Commit c7f65ce1 authored by Jan Kara's avatar Jan Kara Committed by Yang Yingliang
Browse files

jbd2: make jbd2_handle_buffer_credits() handle reserved handles



mainline inclusion
from mainline-5.5-rc1
commit 3c845acd
category: bugfix
bugzilla: 25031
CVE: NA
---------------------------

The helper jbd2_handle_buffer_credits() doesn't correctly handle reserved
handles which can lead to crashes. Fix it getting of journal pointer to
work for reserved handles as well.

Fixes: a9a8344e ("ext4, jbd2: Provide accessor function for handle credits")
Reported-by: default avatarEric Biggers <ebiggers@kernel.org>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20191115102210.29445-1-jack@suse.cz


Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>

Signed-off-by: default avatarzhangyi (F) <yi.zhang@huawei.com>
Reviewed-by: default avatarYang Erkun <yangerkun@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent cf55eb91
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment