Re: [PATCH v2 1/2] kthread: remove kthread_exit()
From: Steven Rostedt
Date: Wed Mar 18 2026 - 19:13:42 EST
On Wed, 11 Mar 2026 10:47:36 +0000
David Laight <david.laight.linux@xxxxxxxxx> wrote:
> > -#define module_put_and_kthread_exit(code) kthread_exit(code)
> > +#define module_put_and_kthread_exit(code) do_exit(code)
>
> I'm intrigued...
> How does that actually know to do the module_put()?
> (I know it does one - otherwise my driver wouldn't unload.)
It's in the !CONFIG_MODULES section. No module_put() necessary. Only the
kthread_exit (do_exit) is needed.
-- Steve