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: <1364390347-4360-1-git-send-email-wenqing.lz@taobao.com> Date: Wed, 27 Mar 2013 21:19:07 +0800 From: Zheng Liu <gnehzuil.liu@...il.com> To: linux-ext4@...r.kernel.org Cc: Zheng Liu <wenqing.lz@...bao.com> Subject: [PATCH] ext4: take i_mutex in ext4_symlink to eliminate a warning from ext4_truncate From: Zheng Liu <wenqing.lz@...bao.com> After applied this commit (8e4061cb), we will get a warning from ext4_truncate when i_mutex isn't taken. Here the assumption is that i_mutex should be taken when we do a truncation. In ext4_symlink we could need to call ext4_truncate to trim some blocks beyond i_size, but the i_mutex isn't taken. Signed-off-by: Zheng Liu <wenqing.lz@...bao.com> --- fs/ext4/namei.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index 3825d6a..d75f91a 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -2856,7 +2856,9 @@ retry: ext4_journal_stop(handle); if (err) goto err_drop_inode; + mutex_lock(&inode->i_mutex); err = __page_symlink(inode, symname, l, 1); + mutex_unlock(&inode->i_mutex); if (err) goto err_drop_inode; /* -- 1.7.12.rc2.18.g61b472e -- 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