aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVegard Nossum <vegard.nossum@gmail.com>2009-05-16 05:26:20 -0400
committerVegard Nossum <vegard.nossum@gmail.com>2009-06-15 09:49:42 -0400
commit3b5c760efcddf1ebdd39a2035b554e96febd7466 (patch)
treeefc709a5a17216e66aebe44c5f80fc2ee168edcd
parent3446a8aa7ebcbc0a799e5e8fc4f2da0738d6bc21 (diff)
fs: fix do_mount_root() false positive kmemcheck warning
This false positive is due to the fact that do_mount_root() fakes a mount option (which is normally read from userspace), and the kernel unconditionally reads a whole page for the mount option. Hide the false positive by using the new __getname_gfp() with the __GFP_NOTRACK_FALSE_POSITIVE flag. Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
-rw-r--r--init/do_mounts.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/init/do_mounts.c b/init/do_mounts.c
index dd7ee5f203f3..093f65915501 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -231,7 +231,8 @@ static int __init do_mount_root(char *name, char *fs, int flags, void *data)
231 231
232void __init mount_block_root(char *name, int flags) 232void __init mount_block_root(char *name, int flags)
233{ 233{
234 char *fs_names = __getname(); 234 char *fs_names = __getname_gfp(GFP_KERNEL
235 | __GFP_NOTRACK_FALSE_POSITIVE);
235 char *p; 236 char *p;
236#ifdef CONFIG_BLOCK 237#ifdef CONFIG_BLOCK
237 char b[BDEVNAME_SIZE]; 238 char b[BDEVNAME_SIZE];