ext4: fix potential use after free in __ext4_journal_stop
There is a use-after-free possibility in __ext4_journal_stop() in the case that we free the handle in the first jbd2_journal_stop() because we're referencing handle->h_err afterwards. This was introduced in 9705acd63b125dee8b15c705216d7186daea4625 and it is wrong. Fix it by storing the handle->h_err value beforehand and avoid referencing potentially freed handle. Change-Id: I68f13ab93f017e4886d8cf1b5c6e234a138a3e34 Fixes: 9705acd63b125dee8b15c705216d7186daea4625 Signed-off-by:Lukas Czerner <lczerner@redhat.com> Reviewed-by:
Andreas Dilger <adilger@dilger.ca> Cc: stable@vger.kernel.org Git-repo: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git Git-commit: 6934da9238da947628be83635e365df41064b09b Signed-off-by:
Dennis Cagle <d-cagle@codeaurora.org>
Loading
Please register or sign in to comment