Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] 9p: null terminate error strings for debug print

We weren't properly NULL terminating protocol error strings for our debug
printk resulting in garbage being included in the output when debug was
enabled.

Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Eric Van Hensbergen and committed by
Linus Torvalds
e540eb45 da977b2c

+1
+1
fs/9p/error.c
··· 83 83 84 84 if (errno == 0) { 85 85 /* TODO: if error isn't found, add it dynamically */ 86 + errstr[len] = 0; 86 87 printk(KERN_ERR "%s: errstr :%s: not found\n", __FUNCTION__, 87 88 errstr); 88 89 errno = 1;