[GIT PULL FOR v6.12] cec core fix/improvement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mauro,

After adding the new CEC_MSG_FL_REPLY_VENDOR_ID flag I discovered that the
cec_msg_set_reply_to() helper in the public cec.h header never set the flags
field to 0. Application code that never initialized struct cec_msg and that
used this helper function could end up with a random value in the flags field.

With the original two flags this had very limited impact (i.e. it was not
very likely that this would cause transmit errors), but after adding the
new flag, this could easily cause a transmit to be rejected if it was
inadvertently set and it was used with a message other than
CEC_MSG_VENDOR_COMMAND_WITH_ID since that would now return -EINVAL.

This PR adds two patches: one properly zeroes the flags field in
cec_msg_set_reply_to() (marked for stable), the second improves the
handling of the new flag by clearing it unless it is used in combination
with the CEC_MSG_VENDOR_COMMAND_WITH_ID message, rather than returning
-EINVAL as it did originally.

Regards,

	Hans

The following changes since commit e7311aa47a6ac355558bc65512aa7c381f8506ec:

  media: siano: Simplify smscore_load_firmware_from_file (2024-08-05 16:30:24 +0200)

are available in the Git repository at:

  git://linuxtv.org/hverkuil/media_tree.git tags/br-v6.12b

for you to fetch changes up to 4428fcb0fc70cc718c826d8e2940043d884e851a:

  media: cec: cec-adap.c: improve CEC_MSG_FL_REPLY_VENDOR_ID check (2024-08-08 11:14:29 +0200)

----------------------------------------------------------------
Tag branch

----------------------------------------------------------------
Hans Verkuil (2):
      media: uapi/linux/cec.h: cec_msg_set_reply_to: zero flags
      media: cec: cec-adap.c: improve CEC_MSG_FL_REPLY_VENDOR_ID check

 drivers/media/cec/core/cec-adap.c | 11 ++++++-----
 include/uapi/linux/cec.h          |  6 +++++-
 2 files changed, 11 insertions(+), 6 deletions(-)




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux