]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
media: cec: avoid decrementing transmit_queue_sz if it is 0
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Sat, 7 Dec 2019 22:48:09 +0000 (23:48 +0100)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 29 Jan 2020 04:47:27 +0000 (23:47 -0500)
commitd6d8b3b6a432ed5addcccbb807ced7b85955a5e4
tree08999497c48236ec81722bc7c65986f05bf398d5
parent8a95de8b40656e91395b5d7a77e9214570bc7dbe
media: cec: avoid decrementing transmit_queue_sz if it is 0

BugLink: https://bugs.launchpad.net/bugs/1860602
commit 95c29d46ab2a517e4c26d0a07300edca6768db17 upstream.

WARN if transmit_queue_sz is 0 but do not decrement it.
The CEC adapter will become unresponsive if it goes below
0 since then it thinks there are 4 billion messages in the
queue.

Obviously this should not happen, but a driver bug could
cause this.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Cc: <stable@vger.kernel.org> # for v4.12 and up
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/media/cec/cec-adap.c