lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <20130111100639.GA3302@suse.de> Date: Fri, 11 Jan 2013 10:06:39 +0000 From: Mel Gorman <mgorman@...e.de> To: Theodore Ts'o <tytso@....edu> Cc: Tao Ma <boyu.mt@...bao.com>, linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org Subject: [PATCH] ext4: Fix memory leak in ext4_init_new_dir Commit a774f9c2 "ext4: make ext4_init_dot_dotdot for inline dir usage" is a preparation cleanup for later ext4 patches but there was a snag when moving code to the newly created ext4_init_new_dir() function. ext4_bread() is called twice but brelse() is only called one leading to a memory leak. The user-visible effect is that after a compile-orientated benchmark 0% of memory could be allocated as transparent huge pages. This patch deletes the extra call and after it is applied, 76% of memory could be allocated after the same test. Signed-off-by: Mel Gorman <mgorman@...e.de> --- fs/ext4/namei.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index 8990165..d068885 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -2368,7 +2368,6 @@ static int ext4_init_new_dir(handle_t *handle, struct inode *dir, } inode->i_size = EXT4_I(inode)->i_disksize = blocksize; - dir_block = ext4_bread(handle, inode, 0, 1, &err); if (!(dir_block = ext4_bread(handle, inode, 0, 1, &err))) { if (!err) { err = -EIO; -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists