Skip to content

Commit

Permalink
fs: fix do_mount_root() false positive kmemcheck warning
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Vegard Nossum <[email protected]>
  • Loading branch information
vegard committed Jun 15, 2009
1 parent 3446a8a commit 3b5c760
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion init/do_mounts.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,8 @@ static int __init do_mount_root(char *name, char *fs, int flags, void *data)

void __init mount_block_root(char *name, int flags)
{
char *fs_names = __getname();
char *fs_names = __getname_gfp(GFP_KERNEL
| __GFP_NOTRACK_FALSE_POSITIVE);
char *p;
#ifdef CONFIG_BLOCK
char b[BDEVNAME_SIZE];
Expand Down

0 comments on commit 3b5c760

Please sign in to comment.