Skip to contentSkip to conversation

hfs-avoid-crash-in-hfs_bnode_create.patch removed from -mm tree

merged [email protected] 1 participant 1 message May 28, 2013 HFS filesystem

lore
Share & tools
lore
#0 lore raw

Subject: [merged] hfs-avoid-crash-in-hfs_bnode_create.patch removed from -mm tree
To: [email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Tue, 28 May 2013 12:36:49 -0700

The patch titled
Subject: hfs: avoid crash in hfs_bnode_create
has been removed from the -mm tree. Its filename was
hfs-avoid-crash-in-hfs_bnode_create.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Jeff Mahoney <[email protected]>
Subject: hfs: avoid crash in hfs_bnode_create

Commit 634725a92938 ("hfs: cleanup HFS+ prints") removed the BUG_ON in hfs_bnode_create in hfsplus. This patch removes it from the hfs version and avoids an fsfuzzer crash.

---

 fs/hfs/bnode.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
fs/hfs/bnode.c renamed from fs/hfs/bnode.c~hfs-avoid-crash-in-hfs_bnode_create +5 -1
diff -puN fs/hfs/bnode.c~hfs-avoid-crash-in-hfs_bnode_create fs/hfs/bnode.c
@@ -415,7 +415,11 @@ struct hfs_bnode *hfs_bnode_create(struc
 	spin_lock(&tree->hash_lock);
 	node = hfs_bnode_findhash(tree, num);
 	spin_unlock(&tree->hash_lock);
-	BUG_ON(node);
+	if (node) {
+		pr_crit("new node %u already hashed?\n", num);
+		WARN_ON(1);
+		return node;
+	}
 	node = __hfs_bnode_create(tree, num);
 	if (!node)
 		return ERR_PTR(-ENOMEM);

_

Patches currently in -mm which might be from [email protected] are

linux-next.patch reiserfs-fix-deadlock-with-nfs-racing-on-create-lookup.patch