We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 68f23b8 commit c7a91bcCopy full SHA for c7a91bc
mm/mempolicy.c
@@ -2821,6 +2821,9 @@ int mpol_parse_str(char *str, struct mempolicy **mpol)
2821
char *flags = strchr(str, '=');
2822
int err = 1, mode;
2823
2824
+ if (flags)
2825
+ *flags++ = '\0'; /* terminate mode string */
2826
+
2827
if (nodelist) {
2828
/* NUL-terminate mode or flags string */
2829
*nodelist++ = '\0';
@@ -2831,9 +2834,6 @@ int mpol_parse_str(char *str, struct mempolicy **mpol)
2831
2834
} else
2832
2835
nodes_clear(nodes);
2833
2836
- if (flags)
- *flags++ = '\0'; /* terminate mode string */
-
2837
mode = match_string(policy_modes, MPOL_MAX, str);
2838
if (mode < 0)
2839
goto out;
0 commit comments