Re: [PATCH v5a 5/5] treewide: Convert del_timer*() to timer_shutdown*()

From: Linus Torvalds
Date: Sun Nov 06 2022 - 15:52:11 EST


Thanks, this looks reasonable.

On Sat, Nov 5, 2022 at 10:46 PM Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
>
> The coccinelle script:
>
> @@
> expression E;
> identifier ptr, timer, rfield, slab;

I think Julia suggested making 'ptr' be an expression too, and I think
she's right. Probably 'slab' should be too - there's no reason to
limit it to just one identifier.

> ... when strict
> when != ptr->timer.function = E;

I suspect any "ptr->timer" access anywhere between the
del_timer_sync() and the freeing should disable things.

Although hopefully there aren't any other odd cases than that one
"clear timer function by hand" one.

Linus