aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLevin, Alexander (Sasha Levin) <alexander.levin@verizon.com>2017-11-15 20:35:54 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-11-15 21:21:04 -0500
commit75f296d93bcebcfe375884ddac79e30263a31766 (patch)
treed536ce2a9f7837c26644e14a0ea2ab7b01c07fed /kernel
parent4950276672fce5c241857540f8561c440663673d (diff)
kmemcheck: stop using GFP_NOTRACK and SLAB_NOTRACK
Convert all allocations that used a NOTRACK flag to stop using it. Link: http://lkml.kernel.org/r/20171007030159.22241-3-alexander.levin@verizon.com Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Cc: Alexander Potapenko <glider@google.com> Cc: Eric W. Biederman <ebiederm@xmission.com> Cc: Michal Hocko <mhocko@kernel.org> Cc: Pekka Enberg <penberg@kernel.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Tim Hansen <devtimhansen@gmail.com> Cc: Vegard Nossum <vegardno@ifi.uio.no> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/fork.c12
-rw-r--r--kernel/signal.c3
2 files changed, 7 insertions, 8 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 006dc5899a1a..4e55eedba8d6 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -469,7 +469,7 @@ void __init fork_init(void)
469 /* create a slab on which task_structs can be allocated */ 469 /* create a slab on which task_structs can be allocated */
470 task_struct_cachep = kmem_cache_create("task_struct", 470 task_struct_cachep = kmem_cache_create("task_struct",
471 arch_task_struct_size, align, 471 arch_task_struct_size, align,
472 SLAB_PANIC|SLAB_NOTRACK|SLAB_ACCOUNT, NULL); 472 SLAB_PANIC|SLAB_ACCOUNT, NULL);
473#endif 473#endif
474 474
475 /* do the arch specific task caches init */ 475 /* do the arch specific task caches init */
@@ -2205,18 +2205,18 @@ void __init proc_caches_init(void)
2205 sighand_cachep = kmem_cache_create("sighand_cache", 2205 sighand_cachep = kmem_cache_create("sighand_cache",
2206 sizeof(struct sighand_struct), 0, 2206 sizeof(struct sighand_struct), 0,
2207 SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_TYPESAFE_BY_RCU| 2207 SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_TYPESAFE_BY_RCU|
2208 SLAB_NOTRACK|SLAB_ACCOUNT, sighand_ctor); 2208 SLAB_ACCOUNT, sighand_ctor);
2209 signal_cachep = kmem_cache_create("signal_cache", 2209 signal_cachep = kmem_cache_create("signal_cache",
2210 sizeof(struct signal_struct), 0, 2210 sizeof(struct signal_struct), 0,
2211 SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_NOTRACK|SLAB_ACCOUNT, 2211 SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_ACCOUNT,
2212 NULL); 2212 NULL);
2213 files_cachep = kmem_cache_create("files_cache", 2213 files_cachep = kmem_cache_create("files_cache",
2214 sizeof(struct files_struct), 0, 2214 sizeof(struct files_struct), 0,
2215 SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_NOTRACK|SLAB_ACCOUNT, 2215 SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_ACCOUNT,
2216 NULL); 2216 NULL);
2217 fs_cachep = kmem_cache_create("fs_cache", 2217 fs_cachep = kmem_cache_create("fs_cache",
2218 sizeof(struct fs_struct), 0, 2218 sizeof(struct fs_struct), 0,
2219 SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_NOTRACK|SLAB_ACCOUNT, 2219 SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_ACCOUNT,
2220 NULL); 2220 NULL);
2221 /* 2221 /*
2222 * FIXME! The "sizeof(struct mm_struct)" currently includes the 2222 * FIXME! The "sizeof(struct mm_struct)" currently includes the
@@ -2227,7 +2227,7 @@ void __init proc_caches_init(void)
2227 */ 2227 */
2228 mm_cachep = kmem_cache_create("mm_struct", 2228 mm_cachep = kmem_cache_create("mm_struct",
2229 sizeof(struct mm_struct), ARCH_MIN_MMSTRUCT_ALIGN, 2229 sizeof(struct mm_struct), ARCH_MIN_MMSTRUCT_ALIGN,
2230 SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_NOTRACK|SLAB_ACCOUNT, 2230 SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_ACCOUNT,
2231 NULL); 2231 NULL);
2232 vm_area_cachep = KMEM_CACHE(vm_area_struct, SLAB_PANIC|SLAB_ACCOUNT); 2232 vm_area_cachep = KMEM_CACHE(vm_area_struct, SLAB_PANIC|SLAB_ACCOUNT);
2233 mmap_init(); 2233 mmap_init();
diff --git a/kernel/signal.c b/kernel/signal.c
index 8dcd8825b2de..aa1fb9f905db 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -1036,8 +1036,7 @@ static int __send_signal(int sig, struct siginfo *info, struct task_struct *t,
1036 else 1036 else
1037 override_rlimit = 0; 1037 override_rlimit = 0;
1038 1038
1039 q = __sigqueue_alloc(sig, t, GFP_ATOMIC | __GFP_NOTRACK_FALSE_POSITIVE, 1039 q = __sigqueue_alloc(sig, t, GFP_ATOMIC, override_rlimit);
1040 override_rlimit);
1041 if (q) { 1040 if (q) {
1042 list_add_tail(&q->list, &pending->list); 1041 list_add_tail(&q->list, &pending->list);
1043 switch ((unsigned long) info) { 1042 switch ((unsigned long) info) {