mdmon: lock current memory as well as future memory.
mlockall(MCL_FUTURE) only locks mappings that have not yet been created. To lock all memory used by the process, we need MCL_CURRENT | MCL_FUTURE Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
5d504f4278
commit
1373b07d75
2
mdmon.c
2
mdmon.c
|
@ -545,7 +545,7 @@ int mdmon(char *devname, int devnum, int scan, char *switchroot)
|
||||||
ignore = dup(0);
|
ignore = dup(0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
mlockall(MCL_FUTURE);
|
mlockall(MCL_CURRENT | MCL_FUTURE);
|
||||||
|
|
||||||
if (clone_monitor(container) < 0) {
|
if (clone_monitor(container) < 0) {
|
||||||
fprintf(stderr, "mdmon: failed to start monitor process: %s\n",
|
fprintf(stderr, "mdmon: failed to start monitor process: %s\n",
|
||||||
|
|
Loading…
Reference in New Issue