[Intel-gfx] [PATCH v4a 00/38] timers: Use timer_shutdown*() before freeing timers

Steven Rostedt rostedt at goodmis.org
Sat Nov 5 14:47:30 UTC 2022


On Sat, 5 Nov 2022 07:18:17 -0700
Guenter Roeck <linux at roeck-us.net> wrote:

> Just in case you didn't notice:
> 
> Looking through the resulting code, I think some of the remaining
> calls to del_singleshot_timer_sync() can be converted as well.
> 
> The calls in drivers/staging/wlan-ng/prism2usb.c:prism2sta_disconnect_usb()
> are obvious (the containing data structure is freed in the same function).
> For drivers/char/tpm/tpm-dev-common.c:tpm_common_release(), the containing
> data structure is freed in the calling code.

Well, actually it is. In patch 5/38:

-#define del_singleshot_timer_sync(t) del_timer_sync(t)
+#define del_singleshot_timer_sync(t) timer_shutdown_sync(t)

This was the reason for patch 1. It was the only user of that function
that reused the timer after calling that function.

-- Steve


More information about the Intel-gfx mailing list