diff options
author | Ye Bin <yebin10@huawei.com> | 2022-09-14 18:08:11 +0800 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2022-09-30 23:46:52 -0400 |
commit | e0d5fc7a6d80ac2406c7dfc6bb625201d0250a8a (patch) | |
tree | 5d744ae0a8cad0fd3dabca9fdb58ee50009db5e9 /mm/cma.h | |
parent | 7177dd009c7c04290891e9a534cd47d1b620bd04 (diff) |
jbd2: fix potential buffer head reference count leak
As in 'jbd2_fc_wait_bufs' if buffer isn't uptodate, will return -EIO without
update 'journal->j_fc_off'. But 'jbd2_fc_release_bufs' will release buffer head
from ‘j_fc_off - 1’ if 'bh' is NULL will terminal release which will lead to
buffer head buffer head reference count leak.
To solve above issue, update 'journal->j_fc_off' before return -EIO.
Cc: stable@kernel.org
Signed-off-by: Ye Bin <yebin10@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20220914100812.1414768-2-yebin10@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'mm/cma.h')
0 files changed, 0 insertions, 0 deletions