diff options
| author | David Rientjes <[email protected]> | 2013-11-21 14:32:06 -0800 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2013-11-21 16:42:27 -0800 |
| commit | b7a9f420ed737cb7cd4075ba06ac1a6f0da9f878 (patch) | |
| tree | 17c9854b57621cf465522177e4d591f2dea01ec3 | |
| parent | 49204c116a9ee24536d371be02a2f05e6493c949 (diff) | |
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: David Rientjes <[email protected]>
Reported-by: Fengguang Wu <[email protected]>
Suggested-by: Kees Cook <[email protected]>
Acked-by: Kees Cook <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
| -rw-r--r-- | mm/mempolicy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index c4403cdf3433..eca4a3129129 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -2950,7 +2950,7 @@ void mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol) return; } - p += snprintf(p, maxlen, policy_modes[mode]); + p += snprintf(p, maxlen, "%s", policy_modes[mode]); if (flags & MPOL_MODE_FLAGS) { p += snprintf(p, buffer + maxlen - p, "="); |