]> www.infradead.org Git - users/jedix/linux-maple.git/commit
serial: xilinx_uartps: Use helper function hrtimer_update_function()
authorNam Cao <namcao@linutronix.de>
Wed, 5 Feb 2025 10:55:13 +0000 (11:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Feb 2025 14:38:02 +0000 (15:38 +0100)
commita2d1afe65a152e8e581b48cebb1517e6bdf09d04
tree76d159f0737f0c46e99146512c50dd113e303115
parent1bd2aad57da95f7f2d2bb52f7ad15c0f4993a685
serial: xilinx_uartps: 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>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/af7823518fb060c6c97105a2513cfc61adbdf38f.1738746927.git.namcao@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/xilinx_uartps.c