]> git.ipfire.org Git - thirdparty/linux.git/commit
io_uring: Use helper function hrtimer_update_function()
authorNam Cao <namcao@linutronix.de>
Wed, 5 Feb 2025 10:55:14 +0000 (11:55 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 18 Feb 2025 16:41:35 +0000 (17:41 +0100)
commit3f8d93d1371f460ed30ebfa30fb930c0605035fc
treeb25900bfb9a622a22c32c3bfca69fa96ae507189
parenteee00df8e1f1f5648ed8f9e40e2bb54c2877344a
io_uring: Use helper function hrtimer_update_function()

The field 'function' of struct hrtimer should not be changed directly, as
the write is lockless and a concurrent timer expiry might end up using the
wrong function pointer.

Switch to use hrtimer_update_function() which also performs runtime checks
that it is safe to modify the callback.

Signed-off-by: Nam Cao <namcao@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/9b33f490fb1d207d3918ef5e116dc3412ae35c1e.1738746927.git.namcao@linutronix.de
io_uring/io_uring.c