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  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]
Date:	Sun, 30 Dec 2012 14:52:53 +0900
From:	Namjae Jeon <>
	Namjae Jeon <>,
	Namjae Jeon <>,
	Amit Sahrawat <>
Subject: [PATCH 3/4] f2fs: fix removing cache entry within proper lock

From: Namjae Jeon <>

Cache entry for free NID, is not getting removed under proper
lock in case of error in add_free_nid. So, free the cache entry
first before releasing the spinlock.

Signed-off-by: Namjae Jeon <>
Signed-off-by: Amit Sahrawat <>
 fs/f2fs/node.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 5066bfd..09139fb 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1227,8 +1227,8 @@ retry:
 	if (__lookup_free_nid_list(nid, &nm_i->free_nid_list)) {
-		spin_unlock(&nm_i->free_nid_list_lock);
 		kmem_cache_free(free_nid_slab, i);
+		spin_unlock(&nm_i->free_nid_list_lock);
 		return 0;
 	list_add_tail(&i->list, &nm_i->free_nid_list);

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists