diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-08-21 21:50:58 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-14 10:00:17 -0700 |
commit | 4c795fe18aa1d2756a82c46ca29d4bfad2704d4d (patch) | |
tree | 5dedd17670bf9371dca1cd0e5e389505a82e13b7 /fs | |
parent | d3078898b6f08028ee5ab8f6e8d12216d7f707ee (diff) |
UBIFS: fix complaints about too small debug buffer size
commit 65b455b123c7e2b835a0b7148f9bae584f95000e upstream.
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@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Tested-by: Michael Hench <michaelhench@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ubifs/debug.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ubifs/debug.h b/fs/ubifs/debug.h index 9f717655df1..28e3de1892b 100644 --- a/fs/ubifs/debug.h +++ b/fs/ubifs/debug.h @@ -170,7 +170,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__, \ |