[PATCH 0/5] fix missing break in list_or_each_entry

Xiaomeng Tong xiam0nd.tong at gmail.com
Wed Mar 30 12:02:41 UTC 2022


Instead of exiting the loop as expected when an entry is found, the
list_for_each_entry() continues until the traversal is complete. It
could lead to invalid reference or set 'is_*' flags mistakely.

To fix this, when an entry is found, add a break to exit the loop.

Xiaomeng Tong (5):
  gma500: fix a missing break in oaktrail_crtc_mode_set
  gma500: fix a missing break in cdv_intel_crtc_mode_set
  gma500: fix a missing break in psb_intel_crtc_mode_set
  gma500: fix a missing break in cdv_intel_dp_set_m_n
  gma500: fix a missing break in psb_driver_load

 drivers/gpu/drm/gma500/cdv_intel_display.c | 2 ++
 drivers/gpu/drm/gma500/cdv_intel_dp.c      | 2 ++
 drivers/gpu/drm/gma500/oaktrail_crtc.c     | 2 ++
 drivers/gpu/drm/gma500/psb_drv.c           | 2 ++
 drivers/gpu/drm/gma500/psb_intel_display.c | 2 ++
 5 files changed, 10 insertions(+)

-- 
2.17.1



More information about the dri-devel mailing list