|
|
Message-ID: <201909301551.ECF10DFB66@keescook>
Date: Mon, 30 Sep 2019 15:52:19 -0700
From: Kees Cook <keescook@...omium.org>
To: Romain Perier <romain.perier@...il.com>
Cc: kernel-hardening@...ts.openwall.com
Subject: Re: [PRE-REVIEW PATCH 16/16] tasklet: Add the new initialization
function permanently
On Sun, Sep 29, 2019 at 06:30:28PM +0200, Romain Perier wrote:
> Now that everything has been converted to the new API, we can remove
> tasklet_init() and replace it by tasklet_setup().
>
> Signed-off-by: Romain Perier <romain.perier@...il.com>
If this is the last user of TASKLET_*_TYPE casts, those should get
dropped here too.
-Kees
> ---
> include/linux/interrupt.h | 9 +--------
> kernel/softirq.c | 4 ++--
> 2 files changed, 3 insertions(+), 10 deletions(-)
>
> diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
> index 506300396db9..0e8f6bca45a4 100644
> --- a/include/linux/interrupt.h
> +++ b/include/linux/interrupt.h
> @@ -672,18 +672,11 @@ static inline void tasklet_enable(struct tasklet_struct *t)
>
> extern void tasklet_kill(struct tasklet_struct *t);
> extern void tasklet_kill_immediate(struct tasklet_struct *t, unsigned int cpu);
> -extern void tasklet_init(struct tasklet_struct *t,
> +extern void tasklet_setup(struct tasklet_struct *t,
> void (*func)(struct tasklet_struct *));
>
> #define from_tasklet(var, callback_tasklet, tasklet_fieldname) \
> container_of(callback_tasklet, typeof(*var), tasklet_fieldname)
> -
> -static inline void tasklet_setup(struct tasklet_struct *t,
> - void (*callback)(struct tasklet_struct *))
> -{
> - tasklet_init(t, (TASKLET_FUNC_TYPE)callback);
> -}
> -
> /*
> * Autoprobing for irqs:
> *
> diff --git a/kernel/softirq.c b/kernel/softirq.c
> index 7415a7c4b494..179dce78fff8 100644
> --- a/kernel/softirq.c
> +++ b/kernel/softirq.c
> @@ -546,7 +546,7 @@ static __latent_entropy void tasklet_hi_action(struct softirq_action *a)
> tasklet_action_common(a, this_cpu_ptr(&tasklet_hi_vec), HI_SOFTIRQ);
> }
>
> -void tasklet_init(struct tasklet_struct *t,
> +void tasklet_setup(struct tasklet_struct *t,
> void (*func)(struct tasklet_struct *))
> {
> t->next = NULL;
> @@ -554,7 +554,7 @@ void tasklet_init(struct tasklet_struct *t,
> atomic_set(&t->count, 0);
> t->func = func;
> }
> -EXPORT_SYMBOL(tasklet_init);
> +EXPORT_SYMBOL(tasklet_setup);
>
> void tasklet_kill(struct tasklet_struct *t)
> {
> --
> 2.23.0
>
--
Kees Cook
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.