Skip to content
Commit 3a6aa102 authored by Andreas Gruenbacher's avatar Andreas Gruenbacher Committed by Phil Elwell
Browse files

kthread: add kthread_stop_put

[ Upstream commit 6309727e ]

Add a kthread_stop_put() helper that stops a thread and puts its task
struct.  Use it to replace the various instances of kthread_stop()
followed by put_task_struct().

Remove the kthread_stop_put() macro in usbip that is similar but doesn't
return the result of kthread_stop().

[agruenba@redhat.com: fix kerneldoc comment]
  Link: https://lkml.kernel.org/r/20230911111730.2565537-1-agruenba@redhat.com
[akpm@linux-foundation.org: document kthread_stop_put()'s argument]
Link: https://lkml.kernel.org/r/20230907234048.2499820-1-agruenba@redhat.com


Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Stable-dep-of: bb9025f4 ("dma-mapping: benchmark: fix up kthread-related error handling")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 065ffc77
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment