forked fromtorvalds/linux
- Notifications
You must be signed in to change notification settings - Fork1
Commit8970a63
mm/mempolicy.c: avoid use uninitialized preferred_node
Alexander reported a use of uninitialized memory in __mpol_equal(),which is caused by incorrect use of preferred_node.When mempolicy in mode MPOL_PREFERRED with flags MPOL_F_LOCAL, it usesnuma_node_id() instead of preferred_node, however, __mpol_equal() usespreferred_node without checking whether it is MPOL_F_LOCAL or not.[akpm@linux-foundation.org: slight comment tweak]Link:http://lkml.kernel.org/r/4ebee1c2-57f6-bcb8-0e2d-1833d1ee0bb7@huawei.comFixes:fc36b8d ("mempolicy: use MPOL_F_LOCAL to Indicate Preferred Local Policy")Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>Reported-by: Alexander Potapenko <glider@google.com>Tested-by: Alexander Potapenko <glider@google.com>Reviewed-by: Andrew Morton <akpm@linux-foundation.org>Cc: Dmitriy Vyukov <dvyukov@google.com>Cc: Vlastimil Babka <vbabka@suse.cz>Cc: Michal Hocko <mhocko@kernel.org>Signed-off-by: Andrew Morton <akpm@linux-foundation.org>Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>1 parent3215b9d commit8970a63
1 file changed
+3
-0
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2124 | 2124 |
| |
2125 | 2125 |
| |
2126 | 2126 |
| |
| 2127 | + | |
| 2128 | + | |
| 2129 | + | |
2127 | 2130 |
| |
2128 | 2131 |
| |
2129 | 2132 |
| |
|
0 commit comments
Comments
(0)