Commit 066ff17c authored by Andrey Konovalov's avatar Andrey Konovalov Committed by Stephen Rothwell
Browse files

kasan: remove __kasan_unpoison_stack

There's no need for __kasan_unpoison_stack() helper, as it's only
currently used in a single place. Removing it also removes unneeded

No functional changes.


Signed-off-by: default avatarAndrey Konovalov <>
Reviewed-by: default avatarDmitry Vyukov <>
Reviewed-by: default avatarMarco Elver <>
Tested-by: Vincenzo Frascino's avatarVincenzo Frascino <>
Cc: Alexander Potapenko <>
Cc: Andrey Ryabinin <>
Cc: Branislav Rankov <>
Cc: Catalin Marinas <>
Cc: Evgenii Stepanov <>
Cc: Kevin Brodsky <>
Cc: Vasily Gorbik <>
Cc: Will Deacon <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarStephen Rothwell <>
parent 852ba670
......@@ -65,18 +65,12 @@ void kasan_unpoison_range(const void *address, size_t size)
static void __kasan_unpoison_stack(struct task_struct *task, const void *sp)
void *base = task_stack_page(task);
size_t size = sp - base;
unpoison_range(base, size);
/* Unpoison the entire stack for a task. */
void kasan_unpoison_task_stack(struct task_struct *task)
__kasan_unpoison_stack(task, task_stack_page(task) + THREAD_SIZE);
void *base = task_stack_page(task);
unpoison_range(base, THREAD_SIZE);
/* Unpoison the stack for the current task beyond a watermark sp value. */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment