Commit b7a9f420 authored by David Rientjes's avatar David Rientjes Committed by Linus Torvalds

mm, mempolicy: silence gcc warning

Fengguang Wu reports that compiling mm/mempolicy.c results in a warning:

  mm/mempolicy.c: In function 'mpol_to_str':
  mm/mempolicy.c:2878:2: error: format not a string literal and no format arguments

Kees says this is because he is using -Wformat-security.

Silence the warning.
Signed-off-by: default avatarDavid Rientjes <rientjes@google.com>
Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Suggested-by: default avatarKees Cook <keescook@chromium.org>
Acked-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 49204c11
...@@ -2950,7 +2950,7 @@ void mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol) ...@@ -2950,7 +2950,7 @@ void mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol)
return; return;
} }
p += snprintf(p, maxlen, policy_modes[mode]); p += snprintf(p, maxlen, "%s", policy_modes[mode]);
if (flags & MPOL_MODE_FLAGS) { if (flags & MPOL_MODE_FLAGS) {
p += snprintf(p, buffer + maxlen - p, "="); p += snprintf(p, buffer + maxlen - p, "=");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment