Commit bb15a078 authored by Changbin Du's avatar Changbin Du Committed by Hailong Tu
Browse files

UPSTREAM: mm/damon: simplify stop mechanism

A kernel thread can exit gracefully with kthread_stop().  So we don't
need a new flag 'kdamond_stop'.  And to make sure the task struct is not
freed when accessing it, get reference to it before termination.

Link: https://lkml.kernel.org/r/20211027130517.4404-1-changbin.du@gmail.com


Signed-off-by: default avatarChangbin Du <changbin.du@gmail.com>
Reviewed-by: default avatarSeongJae Park <sj@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>

(cherry picked from commit 0f91d133)

Bug: 228223814
Signed-off-by: default avatarHailong Tu <tuhailong@oppo.com>
Change-Id: I7b959fc6cd114dc244c895cf19b9fd864b81cd12
parent f1456aa4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment