[PATCH 0/3] drm: drm_sysfs_connector_add() stuff

ville.syrjala at linux.intel.com ville.syrjala at linux.intel.com
Mon Nov 4 11:18:45 PST 2013


Most drivers don't appear to bother with checking drm_connector_sysfs_add()
return value. That means the recent changes to drm_connector_sysfs_add()
have left most drivers susceptible to oopsing on cleanup if
drm_connector_sysfs_add() somehow failed.

This series makes drm_connector_sysfs_remove() safe to call even if
drm_connector_sysfs_add() failed. I also went a bit further and changed
i915 to check the drm_connector_sysfs_add() return value. Not sure if we
really want that patch now that the danger of oopsing is eliminated...

Ville Syrjälä (3):
      drm/sysfs: Remove stale comments about calling drm_sysfs_connector_add() multiple times
      drm/sysfs: Don't pollute connector->kdev if drm_connector_sysfs_add() fails
      drm/i915: Clean up if drm_sysfs_connector_add() fails

 drivers/gpu/drm/drm_sysfs.c       | 49 ++++++++++++++++++++-------------------
 drivers/gpu/drm/i915/intel_crt.c  | 10 +++++++-
 drivers/gpu/drm/i915/intel_ddi.c  |  5 +++-
 drivers/gpu/drm/i915/intel_dp.c   |  6 ++++-
 drivers/gpu/drm/i915/intel_drv.h  |  2 +-
 drivers/gpu/drm/i915/intel_dsi.c  |  9 ++++++-
 drivers/gpu/drm/i915/intel_dvo.c  |  8 ++++++-
 drivers/gpu/drm/i915/intel_hdmi.c | 16 ++++++++++---
 drivers/gpu/drm/i915/intel_lvds.c |  7 +++++-
 drivers/gpu/drm/i915/intel_sdvo.c | 36 ++++++++++++++++++++++------
 drivers/gpu/drm/i915/intel_tv.c   | 10 +++++++-
 11 files changed, 116 insertions(+), 42 deletions(-)



More information about the dri-devel mailing list