]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: cec: abort if the current transmit was canceled
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Thu, 3 Mar 2022 14:01:44 +0000 (14:01 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 16 Jun 2024 11:39:44 +0000 (13:39 +0200)
commitb945810fe2cb6aabb94273dcc5a76330395e8a20
tree9f689bd4229ecc0d576c157fa33df99cd91fbbe1
parent6f6340dbe60b6d2083a6936a1d07cad4a8efe963
media: cec: abort if the current transmit was canceled

[ Upstream commit 590a8e564c6eff7e77a84e728612f1269e3c0685 ]

If a transmit-in-progress was canceled, then, once the transmit
is done, mark it as aborted and refrain from retrying the transmit.

To signal this situation the new transmit_in_progress_aborted field is
set to true.

The old implementation would just set adap->transmitting to NULL and
set adap->transmit_in_progress to false, but on the hardware level
the transmit was still ongoing. However, the framework would think
the transmit was aborted, and if a new transmit was issued, then
it could overwrite the HW buffer containing the old transmit with the
new transmit, leading to garbled data on the CEC bus.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Stable-dep-of: 47c82aac10a6 ("media: cec: core: avoid recursive cec_claim_log_addrs")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/cec/core/cec-adap.c
include/media/cec.h