linux-stable/include
Björn Ardö 119f99209d mailbox: forward the hrtimer if not queued and under a lock
[ Upstream commit bca1a10046 ]

This reverts commit c7dacf5b0f,
"mailbox: avoid timer start from callback"

The previous commit was reverted since it lead to a race that
caused the hrtimer to not be started at all. The check for
hrtimer_active() in msg_submit() will return true if the
callback function txdone_hrtimer() is currently running. This
function could return HRTIMER_NORESTART and then the timer
will not be restarted, and also msg_submit() will not start
the timer. This will lead to a message actually being submitted
but no timer will start to check for its compleation.

The original fix that added checking hrtimer_active() was added to
avoid a warning with hrtimer_forward. Looking in the kernel
another solution to avoid this warning is to check hrtimer_is_queued()
before calling hrtimer_forward_now() instead. This however requires a
lock so the timer is not started by msg_submit() inbetween this check
and the hrtimer_forward() call.

Fixes: c7dacf5b0f ("mailbox: avoid timer start from callback")
Signed-off-by: Björn Ardö <bjorn.ardo@axis.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-09 10:23:12 +02:00
..
acpi
asm-generic tlb: hugetlb: Add more sizes to tlb_remove_huge_tlb_entry 2022-04-20 09:34:16 +02:00
clocksource
crypto crypto: drbg - make reseeding from get_random_bytes() synchronous 2022-06-06 08:43:38 +02:00
drm drm: fix EDID struct for old ARM OABI format 2022-06-09 10:22:44 +02:00
dt-bindings
keys
kunit
kvm
linux mailbox: forward the hrtimer if not queued and under a lock 2022-06-09 10:23:12 +02:00
math-emu
media
memory memory: renesas-rpc-if: Fix HF/OSPI data transfer in Manual Mode 2022-05-09 09:14:34 +02:00
misc
net ipv6: fix locking issues with loops over idev->addr_list 2022-06-09 10:22:31 +02:00
pcmcia
ras
rdma
scsi scsi: fcoe: Fix Wstringop-overflow warnings in fcoe_wwn_from_mac() 2022-06-09 10:23:07 +02:00
soc
sound ALSA: jack: Access input_dev under mutex 2022-06-09 10:22:32 +02:00
target
trace rxrpc: Fix decision on when to generate an IDLE ACK 2022-06-09 10:23:02 +02:00
uapi signal: Deliver SIGTRAP on perf event asynchronously if blocked 2022-06-09 10:22:48 +02:00
vdso
video
xen