diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-11-01 22:46:47 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-11-01 22:46:47 +0300 |
commit | 2cf3f8133bda2a0945cc4c70e681ecb25b52b913 (patch) | |
tree | d6f1220aa79dad8d9a15362ef47ab23b34c07c0b /fs/btrfs/delayed-ref.h | |
parent | 9c6e8d52a7299b1596334ca49171f2efedc15ef6 (diff) | |
download | linux-2cf3f8133bda2a0945cc4c70e681ecb25b52b913.tar.xz |
btrfs: fix lzo_decompress_bio() kmap leakage
Commit ccaa66c8dd27 reinstated the kmap/kunmap that had been dropped in
commit 8c945d32e604 ("btrfs: compression: drop kmap/kunmap from lzo").
However, it seems to have done so incorrectly due to the change not
reverting cleanly, and lzo_decompress_bio() ended up not having a
matching "kunmap()" to the "kmap()" that was put back.
Also, any assert that the page pointer is not NULL should be before the
kmap() of said pointer, since otherwise you'd just oops in the kmap()
before the assert would even trigger.
I noticed this when trying to verify my btrfs merge, and things not
adding up. I'm doing this fixup before re-doing my merge, because this
commit needs to also be backported to 5.15 (after verification from the
btrfs people).
Fixes: ccaa66c8dd27 ("Revert 'btrfs: compression: drop kmap/kunmap from lzo'")
Cc: David Sterba <dsterba@suse.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/btrfs/delayed-ref.h')
0 files changed, 0 insertions, 0 deletions