Commit d108db41 authored by Changbin Du's avatar Changbin Du Committed by Zheng Zengkai
Browse files

mm/damon: simplify stop mechanism

mainline inclusion
from mainline-5.16
commit 0f91d133
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I4GVMK
CVE: NA

-------------------------------------------------
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)
Signed-off-by: default avatarYue Zou <zouyue3@huawei.com>
Reviewed-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 0dbc2d1f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment