]> git.baikalelectronics.ru Git - kernel.git/commit
ext4 crypto: fix memory leaks in ext4_encrypted_zeroout
authorTheodore Ts'o <tytso@mit.edu>
Sun, 31 May 2015 17:34:24 +0000 (13:34 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 31 May 2015 17:34:24 +0000 (13:34 -0400)
commitcd42d92d8907c48915fcf1389f325da86271ae3e
tree5aead7a970083ed83e40f57c7a25323075de792e
parentad7dc939cd569c95e936a099f62d290169d94afb
ext4 crypto: fix memory leaks in ext4_encrypted_zeroout

ext4_encrypted_zeroout() could end up leaking a bio and bounce page.
Fortunately it's not used much.  While we're fixing things up,
refactor out common code into the static function alloc_bounce_page()
and fix up error handling if mempool_alloc() fails.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/crypto.c