Linux Media Controller development
 help / color / mirror / Atom feed
From: Sean Young <sean@mess.org>
To: linux-media@vger.kernel.org
Cc: Rik van Riel <riel@surriel.com>, Sean Young <sean@mess.org>,
	bpf@vger.kernel.org
Subject: [PATCH v4 00/19] media: Fix locking issues in rc core
Date: Tue,  8 Sep 2026 16:51:48 +0100	[thread overview]
Message-ID: <cover.1788882189.git.sean@mess.org> (raw)

Fix issues found by Sashiko and claude, and other cleanups.

Changes since v3:
 - serial_ir: Fix race condition where timer can be re-armed
   This introduced a new race condition; reworked
 - rc: After rc_unregister_device() timers can be re-armed
   Sashiko suggested a simpler implementation with
   timer_shutdown_sync()
 - Add meson-ir-tx: Validate carrier and duty_cycle
 - Add ir_toy: Validate the maximum tx carrier

Changes since v2:
 - Cosmetic changes in:  Add missing locking for keymap
 - Patch 7 to 17 are new issues found

Changes since v1:
 - Fix issue where input device was still leaked
 - Add: Fix race between bpf(BPG_PROG_ATTACH) and device unregister
 - Add: Fix inconsistent locking of keylock


Sean Young (19):
  media: rc: Ensure registered is cleared in error path
  media: rc: Ensure that rc_unregister_device() does not free input
    device
  media: rc: Fix ABBA deadlock by making locks more fine grained
  media: rc: Add missing locking for keymap
  media: rc: Fix race between bpf(BPG_PROG_ATTACH) and device unregister
  media: rc: mce_kbd: Fix inconsistent locking of keylock
  media: ene_ir: Ensure teardown is done in the correct order
  media: rc: Use binary search for adding or updating a scancode
  media: rc: imon: Bind both interfaces via usb_driver_claim_interface()
  media: ir_toy: Remove unused struct field
  media: nuvoton-cir: Remove unused struct field
  media: ite-cir: Removed unused struct field
  media: fintek-cir: Remove unused fields
  media: mceusb: Remove unused field
  media: serial_ir: Fix race condition where timer can be re-armed
  media: rc: After rc_unregister_device() timers can be re-armed
  media: rc: Validate carrier range in LIRC_SET_REC_CARRIER ioctl
  media: ir_toy: Validate the maximum tx carrier
  media: meson-ir-tx: Validate carrier and duty_cycle

 drivers/media/rc/ene_ir.c             |   4 +-
 drivers/media/rc/fintek-cir.c         |  13 --
 drivers/media/rc/fintek-cir.h         |  22 ----
 drivers/media/rc/imon.c               | 166 +++++++++++--------------
 drivers/media/rc/ir-mce_kbd-decoder.c |   5 +-
 drivers/media/rc/ir_toy.c             |   4 +-
 drivers/media/rc/ite-cir.c            |   1 -
 drivers/media/rc/ite-cir.h            |   1 -
 drivers/media/rc/lirc_dev.c           |   2 +
 drivers/media/rc/mceusb.c             |   1 -
 drivers/media/rc/meson-ir-tx.c        |  54 ++++++--
 drivers/media/rc/nuvoton-cir.h        |   3 -
 drivers/media/rc/rc-ir-raw.c          |  39 +++---
 drivers/media/rc/rc-loopback.c        |   5 -
 drivers/media/rc/rc-main.c            | 169 ++++++++++++++++----------
 drivers/media/rc/serial_ir.c          |   2 +-
 include/media/rc-map.h                |   2 -
 17 files changed, 251 insertions(+), 242 deletions(-)

-- 
2.55.0


             reply	other threads:[~2026-09-08 15:54 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-08 15:51 Sean Young [this message]
2026-09-08 15:51 ` [PATCH v4 01/19] media: rc: Ensure registered is cleared in error path Sean Young
2026-09-11  7:53   ` Hans Verkuil
2026-09-11  8:45     ` Sean Young
2026-09-08 15:51 ` [PATCH v4 02/19] media: rc: Ensure that rc_unregister_device() does not free input device Sean Young
2026-09-08 15:51 ` [PATCH v4 03/19] media: rc: Fix ABBA deadlock by making locks more fine grained Sean Young
2026-09-08 15:51 ` [PATCH v4 04/19] media: rc: Add missing locking for keymap Sean Young
2026-09-11  8:08   ` Hans Verkuil
2026-09-11  8:47     ` Sean Young
2026-09-08 15:51 ` [PATCH v4 05/19] media: rc: Fix race between bpf(BPG_PROG_ATTACH) and device unregister Sean Young
2026-09-08 15:51 ` [PATCH v4 06/19] media: rc: mce_kbd: Fix inconsistent locking of keylock Sean Young
2026-09-08 15:51 ` [PATCH v4 07/19] media: ene_ir: Ensure teardown is done in the correct order Sean Young
2026-09-08 15:51 ` [PATCH v4 08/19] media: rc: Use binary search for adding or updating a scancode Sean Young
2026-09-11  8:10   ` Hans Verkuil
2026-09-11  8:42     ` Sean Young
2026-09-08 15:51 ` [PATCH v4 09/19] media: rc: imon: Bind both interfaces via usb_driver_claim_interface() Sean Young
2026-09-08 15:51 ` [PATCH v4 10/19] media: ir_toy: Remove unused struct field Sean Young
2026-09-08 15:51 ` [PATCH v4 11/19] media: nuvoton-cir: " Sean Young
2026-09-08 15:52 ` [PATCH v4 12/19] media: ite-cir: Removed " Sean Young
2026-09-08 15:52 ` [PATCH v4 13/19] media: fintek-cir: Remove unused fields Sean Young
2026-09-08 15:52 ` [PATCH v4 14/19] media: mceusb: Remove unused field Sean Young
2026-09-08 15:52 ` [PATCH v4 15/19] media: serial_ir: Fix race condition where timer can be re-armed Sean Young
2026-09-08 15:52 ` [PATCH v4 16/19] media: rc: After rc_unregister_device() timers " Sean Young
2026-09-08 15:52 ` [PATCH v4 17/19] media: rc: Validate carrier range in LIRC_SET_REC_CARRIER ioctl Sean Young
2026-09-08 15:52 ` [PATCH v4 18/19] media: ir_toy: Validate the maximum tx carrier Sean Young
2026-09-08 15:52 ` [PATCH v4 19/19] media: meson-ir-tx: Validate carrier and duty_cycle Sean Young

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1788882189.git.sean@mess.org \
    --to=sean@mess.org \
    --cc=bpf@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=riel@surriel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox