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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <5264D574.6000105@cn.fujitsu.com>
Date:	Mon, 21 Oct 2013 15:19:16 +0800
From:	Gu Zheng <guz.fnst@...fujitsu.com>
To:	Kim <jaegeuk.kim@...sung.com>
CC:	f2fs <linux-f2fs-devel@...ts.sourceforge.net>,
	fsdevel <linux-fsdevel@...r.kernel.org>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: [PATCH] f2fs: delete and free dirty dir freeing inode entry when
 sync dirty dir inodes

In sync_dirty_dir_inodes(), remove_dirty_dir_inode() will be called
in the callback of filemap_flush to delete and free dirty dir inode entry.
But for the freeing inode entry, missed this step after sbumit data bio,
and this may lead to a dead loop if these is freeing inode entry in
dir_inode_list. So add the delete and free step to fix it.

Signed-off-by: Gu Zheng <guz.fnst@...fujitsu.com>
---
 fs/f2fs/checkpoint.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 8d16071..f61838f 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -600,7 +600,16 @@ retry:
 		 * wribacking dentry pages in the freeing inode.
 		 */
 		f2fs_submit_bio(sbi, DATA, true);
+
+		spin_lock(&sbi->dir_inode_lock);
+		list_del(&entry->list);
+#ifdef CONFIG_F2FS_STAT_FS
+		sbi->n_dirty_dirs--;
+#endif
+		spin_unlock(&sbi->dir_inode_lock);
+		kmem_cache_free(inode_entry_slab, entry);
 	}
+
 	goto retry;
 }
 
-- 
1.7.7

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ