linux/drivers/rpmsg
Atul Akella 7dd4cffdf4 rpmsg: virtio: fix error handling in TX buffer wait
The TX buffer wait loop in rpmsg_send_offchannel_raw() ignores the
possibility of wait_event_interruptible_timeout() returning a
negative value, which happens when the wait is interrupted by a
signal. In that case the loop spins back around and re-arms the
wait instead of propagating the signal, which can stall a task
that is trying to be killed.

Separately, on a genuine timeout (return value 0) the function
returns -ERESTARTSYS, which is reserved for signal-interrupted
syscalls that the kernel may restart. A timeout is not a signal
and should not be treated as restartable; return -ETIMEDOUT
instead.

Handle both cases explicitly: return err directly when negative,
and return -ETIMEDOUT on timeout.

Fixes: bcabbccabf ("rpmsg: add virtio-based remote processor messaging bus")
Signed-off-by: Atul Akella <atul.akella@gmail.com>
Link: https://lore.kernel.org/r/20261013160055.1362-1-atul.akella@gmail.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2026-10-14 09:45:47 -06:00
..
Kconfig rpmsg: Move the rpmsg control device from rpmsg_char to rpmsg_ctrl 2022-03-13 11:49:53 -05:00
Makefile rpmsg: glink: Introduce packet tracepoints 2024-08-12 15:26:28 -07:00
mtk_rpmsg.c rpmsg: mtk: release channel OF node on device teardown 2026-10-14 09:37:03 -06:00
qcom_glink_native.c rpmsg: glink: fix deadlock in endpoint destroy during driver detach 2026-07-13 21:55:29 -05:00
qcom_glink_native.h rpmsg: glink: Fix spelling of peek 2023-02-14 20:28:48 -08:00
qcom_glink_rpm.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
qcom_glink_smem.c rpmsg: glink: smem: order FIFO read after availability check 2026-07-13 22:11:52 -05:00
qcom_glink_ssr.c rpmsg: qcom_glink_ssr: fix module autoloading 2024-05-06 19:26:28 -07:00
qcom_glink_trace.h rpmsg: glink: Introduce packet tracepoints 2024-08-12 15:26:28 -07:00
qcom_smd.c rpmsg: Replace sprintf() with sysfs_emit() in sysfs show 2026-07-09 14:45:34 -05:00
rpmsg_char.c rpmsg: char: Check for ongoing chrdev destroy 2026-07-09 15:11:17 -05:00
rpmsg_char.h rpmsg: char: Export eptdev create and destroy functions 2022-03-13 11:49:53 -05:00
rpmsg_core.c rpmsg: core: Fix incorrect return value documentation 2026-07-09 14:45:37 -05:00
rpmsg_ctrl.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
rpmsg_internal.h rpmsg: Constify buffer passed to send API 2026-04-06 09:37:51 -05:00
rpmsg_ns.c rpmsg: Replace deprecated strncpy with strscpy_pad 2023-10-23 11:57:57 -06:00
virtio_rpmsg_bus.c rpmsg: virtio: fix error handling in TX buffer wait 2026-10-14 09:45:47 -06:00