diff options
author | Jan Kara <jack@suse.cz> | 2019-11-05 19:44:07 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-12-17 22:38:50 +0300 |
commit | 9d0c2dc1a3a54cecddaafe2b5aa29f4698b6d912 (patch) | |
tree | c1f15ff219ea340267c68ecb5c4e68cc58a4d4a0 /include/crypto/pcrypt.h | |
parent | dc9a5fd2f3053eeb6ce6e0b7d9d5ec4af13a0cd3 (diff) | |
download | linux-9d0c2dc1a3a54cecddaafe2b5aa29f4698b6d912.tar.xz |
jbd2: Fix possible overflow in jbd2_log_space_left()
commit add3efdd78b8a0478ce423bb9d4df6bd95e8b335 upstream.
When number of free space in the journal is very low, the arithmetic in
jbd2_log_space_left() could underflow resulting in very high number of
free blocks and thus triggering assertion failure in transaction commit
code complaining there's not enough space in the journal:
J_ASSERT(journal->j_free > 1);
Properly check for the low number of free blocks.
CC: stable@vger.kernel.org
Reviewed-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20191105164437.32602-1-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/crypto/pcrypt.h')
0 files changed, 0 insertions, 0 deletions