tag name | add-timer-shutdown (7685328352dfd2908e23048f563e328dbd3526e9) |
tag date | 2022-11-06 18:37:30 -0500 |
tagged by | Steven Rostedt (Google) <rostedt@goodmis.org> |
tagged object | commit 870556da63... |
download | linux-trace-add-timer-shutdown.tar.gz |
---|
As discussed here:
https://lore.kernel.org/all/20221106212427.739928660@goodmis.org/
Add a "shutdown" state for timers. This is performed by the new
timer_shutdown_sync() and timer_shutdown() function calls. When this is
called on a timer, it will no longer be able to be re-armed. This should
be called before a timer is freed to prevent it from being re-armed after
being removed from the timer queue and then causing a crash in the timer
code when the timer triggers.
This required renaming some functions that were using the name
timer_shutdown() statically to something more appropriate.
Then a coccinelle script was executed on the entire kernel tree to find
the trivial locations that remove the timer and then frees the object that
the timer exists on.
These changes are not enough to solve all the locations where timers may
be of an issue. But by adding the shutdown infrastructure and the obvious
cases, the more complex cases can be added after they have been reviewed
more closely.
-----BEGIN PGP SIGNATURE-----
iIoEABYIADIWIQRRSw7ePDh/lE+zeZMp5XQQmuv6qgUCY2hG2hQccm9zdGVkdEBn
b29kbWlzLm9yZwAKCRAp5XQQmuv6qnooAQCHfwh8DL+t4cgUhwwSQRTaOOpcWe9o
0+nwjKYttU0F1wEAi0bc+WiiYzh8sRoboSPRE1yEuDRlTv/jLt7y58tP7QQ=
=2Djh
-----END PGP SIGNATURE-----