mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
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:
|
||
|---|---|---|
| .. | ||
| Kconfig | ||
| Makefile | ||
| mtk_rpmsg.c | ||
| qcom_glink_native.c | ||
| qcom_glink_native.h | ||
| qcom_glink_rpm.c | ||
| qcom_glink_smem.c | ||
| qcom_glink_ssr.c | ||
| qcom_glink_trace.h | ||
| qcom_smd.c | ||
| rpmsg_char.c | ||
| rpmsg_char.h | ||
| rpmsg_core.c | ||
| rpmsg_ctrl.c | ||
| rpmsg_internal.h | ||
| rpmsg_ns.c | ||
| virtio_rpmsg_bus.c | ||