summaryrefslogtreecommitdiffstats
path: root/fs/ext4/readpage.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2015-10-02 23:54:58 -0400
committerTheodore Ts'o <tytso@mit.edu>2015-10-02 23:54:58 -0400
commit937d7b84dca58f2565715f2c8e52f14c3d65fb22 (patch)
treef7a734f126f8188996b8a3dc2dee956268946e3a /fs/ext4/readpage.c
parentebd173beb8db5b8b315fa1c5bbac86c54059397a (diff)
downloadlinux-stable-937d7b84dca58f2565715f2c8e52f14c3d65fb22.tar.gz
linux-stable-937d7b84dca58f2565715f2c8e52f14c3d65fb22.tar.bz2
linux-stable-937d7b84dca58f2565715f2c8e52f14c3d65fb22.zip
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. Signed-off-by: Theodore Ts'o <tytso@mit.edu> Cc: stable@vger.kernel.org
Diffstat (limited to 'fs/ext4/readpage.c')
0 files changed, 0 insertions, 0 deletions