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: <000601cf793f$e5377070$afa65150$@samsung.com> Date: Tue, 27 May 2014 09:09:15 +0900 From: Namjae Jeon <namjae.jeon@...sung.com> To: Theodore Ts'o <tytso@....edu> Cc: 'Dan Carpenter' <dan.carpenter@...cle.com>, linux-ext4 <linux-ext4@...r.kernel.org>, Ashish Sangwan <a.sangwan@...sung.com> Subject: [PATCH] ext4: fix missing unlock on error in collapse range Add i_write_mutex unlock on the error handling path in collapse_range(). Cc: Dan Carpenter <dan.carpenter@...cle.com> Signed-off-by: Namjae Jeon <namjae.jeon@...sung.com> Signed-off-by: Ashish Sangwan <a.sangwan@...sung.com> --- fs/ext4/extents.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index ee14768..0c93423 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c @@ -5447,8 +5447,10 @@ int ext4_collapse_range(struct inode *inode, loff_t offset, loff_t len) /* Write out all dirty pages */ ret = filemap_write_and_wait_range(inode->i_mapping, ioffset, LLONG_MAX); - if (ret) + if (ret) { + mutex_unlock(&EXT4_I(inode)->i_write_mutex); return ret; + } /* Take mutex lock */ mutex_lock(&inode->i_mutex); -- 1.7.11-rc0 -- 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