[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20080916165254.52d73a38@infradead.org>
Date: Tue, 16 Sep 2008 16:52:54 -0700
From: Arjan van de Ven <arjan@...radead.org>
To: Al Viro <viro@...IV.linux.org.uk>, linux-kernel@...r.kernel.org
Cc: torvalds@...ux-foundation.org
Subject: [PATCH] fs: add a sanity check in d_free
>From 4ab03e637c357ea70c737cd401732a4d80375173 Mon Sep 17 00:00:00 2001
From: Arjan van de Ven <arjan@...ux.intel.com>
Date: Tue, 16 Sep 2008 16:51:17 -0700
Subject: [PATCH] fs: add a sanity check in d_free
we're seeing some corruption in the dentry->d_alias list that
appears like a free of an entry still on the list; this patch
adds a WARN_ON() to catch this scenario, as suggested by Al Viro
Signed-off-by: Arjan van de Ven <arjan@...ux.intel.com>
---
fs/dcache.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/fs/dcache.c b/fs/dcache.c
index 80e9395..4c39a59 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -69,6 +69,7 @@ struct dentry_stat_t dentry_stat = {
static void __d_free(struct dentry *dentry)
{
+ WARN_ON(!list_empty(&dentry->d_alias));
if (dname_external(dentry))
kfree(dentry->d_name.name);
kmem_cache_free(dentry_cache, dentry);
--
1.5.5.1
--
Arjan van de Ven Intel Open Source Technology Centre
For development, discussion and tips for power savings,
visit http://www.lesswatts.org
--
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