aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2015-10-02 23:54:58 -0400
committerMister Oyster <oysterized@gmail.com>2017-05-29 03:52:04 +0200
commitbe4753e113e08e4f41ef19c40fa9d634bacfe4f4 (patch)
tree5a5ff7005f150ac1f0ee862d0eb1573022ce4e14 /include/linux
parent0694ac72d74e7ba1c1571437ca35b44aca8c3cf8 (diff)
ext4 crypto: fix memory leak in ext4_bio_write_page()
There are times when ext4_bio_write_page() is called even though we don't actually need to do any I/O. This happens when ext4_writepage() gets called by the jbd2 commit path when an inode needs to force its pages written out in order to provide data=ordered guarantees --- and a page is backed by an unwritten (e.g., uninitialized) block on disk, or if delayed allocation means the page's backing store hasn't been allocated yet. In that case, we need to skip the call to ext4_encrypt_page(), since in addition to wasting CPU, it leads to a bounce page and an ext4 crypto context getting leaked. Change-Id: Icd2123808fd7372c11e6f9e17849e242837d729d Signed-off-by: Theodore Ts'o <tytso@mit.edu> Signed-off-by: "Theodore Ts'o" <tytso@google.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions