]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: avoid drop reference to iloc.bh twice
authorPan Bian <bianpan2016@163.com>
Thu, 25 Apr 2019 15:44:15 +0000 (11:44 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 25 Apr 2019 15:44:15 +0000 (11:44 -0400)
commiteb725d20fca13675b96cd63d9d7a5a607a03e89e
tree219607cef9f919264702e71af75fac9d3e0a0f76
parent228e33b1585dbe2e5074751b03d4811221e9c358
ext4: avoid drop reference to iloc.bh twice

The reference to iloc.bh has been dropped in ext4_mark_iloc_dirty.
However, the reference is dropped again if error occurs during
ext4_handle_dirty_metadata, which may result in use-after-free bugs.

Fixes: 83f5fdef1e0d("ext4: add ext4_sb_bread() to disambiguate ENOMEM cases")
Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Jan Kara <jack@suse.cz>
Cc: stable@kernel.org
fs/ext4/resize.c