summaryrefslogtreecommitdiffstats
tag nameadd-timer-shutdown (7685328352dfd2908e23048f563e328dbd3526e9)
tag date2022-11-06 18:37:30 -0500
tagged bySteven Rostedt (Google) <rostedt@goodmis.org>
tagged objectcommit 870556da63...
downloadlinux-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-----