set_mempolicy(): Add mode check.
Fix a problem that does not result in an error even if MPOL_F_STATIC_NODES and MPOL_F_RELATIVE_NODES are simultaneously specified in set_mempolicy() mode. Change-Id: I06e695baf869daee8bc64179748cac27b64e914b Fujitsu: POSTK_DEBUG_TEMP_FIX_99
This commit is contained in:
committed by
Dominique Martinet
parent
6626204c99
commit
04e0456232
@ -8706,6 +8706,11 @@ SYSCALL_DECLARE(set_mempolicy)
|
||||
}
|
||||
}
|
||||
|
||||
if ((mode & MPOL_F_STATIC_NODES) &&
|
||||
(mode & MPOL_F_RELATIVE_NODES)) {
|
||||
error = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
mode &= ~MPOL_MODE_FLAGS;
|
||||
|
||||
switch (mode) {
|
||||
|
||||
Reference in New Issue
Block a user