new 3.5.2 ubifs debug assert

Artem Bityutskiy dedekind1 at gmail.com
Tue Aug 21 15:03:11 EDT 2012


Hi, the below (and attached) patch should fix the issue. Thanks for reporting.
Could you please give it a try?

From: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
Date: Tue, 21 Aug 2012 21:50:58 +0300
Subject: [PATCH] UBIFS: fix complaints about too small debug buffer size

When debugging is enabled, we use a temporary on-stack buffer for formatting
the key strings like "(11368871, direntry, 0xcd0750)". The buffer size is
32 bytes and sometimes it is not enough to fit the key string - e.g., when
inode numbers are high. This is not fatal, but the key strings are incomplete
and UBIFS complains like this:

	UBIFS assert failed in dbg_snprintf_key at 137 (pid 1)

This is a regression caused by "515315a UBIFS: fix key printing".

Fix the issue by increasing the buffer to 48 bytes.

Reported-by: Michael Hench <michaelhench at gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
Cc: stable at vger.kernel.org [v3.3+]
---
 fs/ubifs/debug.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ubifs/debug.h b/fs/ubifs/debug.h
index 8b8cc4e..760de72 100644
--- a/fs/ubifs/debug.h
+++ b/fs/ubifs/debug.h
@@ -167,7 +167,7 @@ struct ubifs_global_debug_info {
 #define ubifs_dbg_msg(type, fmt, ...) \
 	pr_debug("UBIFS DBG " type ": " fmt "\n", ##__VA_ARGS__)
 
-#define DBG_KEY_BUF_LEN 32
+#define DBG_KEY_BUF_LEN 48
 #define ubifs_dbg_msg_key(type, key, fmt, ...) do {                            \
 	char __tmp_key_buf[DBG_KEY_BUF_LEN];                                   \
 	pr_debug("UBIFS DBG " type ": " fmt "%s\n", ##__VA_ARGS__,             \
-- 
1.7.11.2


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-UBIFS-fix-complaints-about-too-small-debug-buffer-si.patch
Type: text/x-patch
Size: 1607 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20120821/543a9cb4/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20120821/543a9cb4/attachment.sig>


More information about the linux-mtd mailing list