History

mm: constify oom_control, scan_control, and alloc_context nodemask

The nodemasks in these structures may come from a variety of sources, including tasks and cpusets - and should never be modified by any code when being passed around inside another context.

Gregory Price committed 5 months ago

Commit baff6d21 parent 567c26a11 files · +26 −22Browse files

Showing the changes to kernel (1 of 11 files). Show all

Unified · Split

kernel/cgroup/cpuset.c+1−1
@@ -4162,7 +4162,7 @@ nodemask_t cpuset_mems_allowed(struct task_struct *tsk) · 4161 unmodified lines
41624162 *
41634163 * Are any of the nodes in the nodemask allowed in current->mems_allowed?
41644164 */
4165−int cpuset_nodemask_valid_mems_allowed(nodemask_t *nodemask)
4165+int cpuset_nodemask_valid_mems_allowed(const nodemask_t *nodemask)
41664166 {
41674167 return nodes_intersects(*nodemask, current->mems_allowed);
41684168 }