All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] cec: introduce cec_notifier_find_hdmi_dev helper
@ 2019-04-08 11:03 Hans Verkuil
  2019-04-08 11:03 ` [PATCH 1/7] cec-notifier: add " Hans Verkuil
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: Hans Verkuil @ 2019-04-08 11:03 UTC (permalink / raw)
  To: linux-media
  Cc: Neil Armstrong, Sylwester Nawrocki, Benjamin Gaignard,
	Thierry Reding, Ettore Chimenti, Wen Yang

Wen Yang reported that some CEC drivers incremented the refcount
of the HDMI device, but never decremented it, potentially leading
to memory leaks.

Rather than fixing each driver I decided to create a helper function
that finds the HDMI device and handles the refcounting correctly.

Two drivers (seco-cec and cros-ec-cec) still required a manual patch.

Regards,

	Hans

Hans Verkuil (7):
  cec-notifier: add cec_notifier_find_hdmi_dev helper
  meson: ao-cec: use new cec_notifier_find_hdmi_dev helper
  s5p_cec: use new cec_notifier_find_hdmi_dev helper
  stih_cec: use new cec_notifier_find_hdmi_dev helper
  tegra_cec: use new cec_notifier_find_hdmi_dev helper
  seco-cec: decrement HDMI device refcount
  cros-ec-cec: decrement HDMI device refcount

 drivers/media/cec/cec-notifier.c              | 24 +++++++++++++++++++
 .../media/platform/cros-ec-cec/cros-ec-cec.c  |  1 +
 drivers/media/platform/meson/ao-cec.c         | 16 ++++---------
 drivers/media/platform/s5p-cec/s5p_cec.c      | 16 ++++---------
 drivers/media/platform/seco-cec/seco-cec.c    |  1 +
 drivers/media/platform/sti/cec/stih-cec.c     | 21 ++++++----------
 drivers/media/platform/tegra-cec/tegra_cec.c  | 14 ++++-------
 include/media/cec-notifier.h                  | 19 ++++++++++++++-
 8 files changed, 65 insertions(+), 47 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-04-08 13:21 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-08 11:03 [PATCH 0/7] cec: introduce cec_notifier_find_hdmi_dev helper Hans Verkuil
2019-04-08 11:03 ` [PATCH 1/7] cec-notifier: add " Hans Verkuil
2019-04-08 13:09   ` Thierry Reding
2019-04-08 13:17     ` Hans Verkuil
2019-04-08 11:03 ` [PATCH 2/7] meson: ao-cec: use new " Hans Verkuil
2019-04-08 12:01   ` Neil Armstrong
2019-04-08 11:03 ` [PATCH 3/7] s5p_cec: " Hans Verkuil
2019-04-08 11:03 ` [PATCH 4/7] stih_cec: " Hans Verkuil
2019-04-08 12:44   ` Benjamin Gaignard
2019-04-08 11:03 ` [PATCH 5/7] tegra_cec: " Hans Verkuil
2019-04-08 11:04 ` [PATCH 6/7] seco-cec: decrement HDMI device refcount Hans Verkuil
2019-04-08 13:21   ` Ettore Chimenti
2019-04-08 11:04 ` [PATCH 7/7] cros-ec-cec: " Hans Verkuil

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.