Skip to content

Commit

Permalink
OMAPDSS: APPLY: fix NULL pointer deref when mgr is not set
Browse files Browse the repository at this point in the history
extra_info_update_ongoing() goes through all overlays, but doesn't check
if the overlay is connected to a manager. This leads to a crash whenever
an overlay has been detached.

Add a check to skip the non-connected overlays.

Reported-by: Rob Clark <rob@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
  • Loading branch information
Rob Clark authored and Tomi Valkeinen committed Jan 2, 2012
1 parent 6ea9b31 commit 1f3f53a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/video/omap2/dss/apply.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,9 @@ static bool extra_info_update_ongoing(void)
ovl = omap_dss_get_overlay(i);
op = get_ovl_priv(ovl);

if (!ovl->manager)
continue;

mp = get_mgr_priv(ovl->manager);

if (!mp->enabled)
Expand Down

0 comments on commit 1f3f53a

Please sign in to comment.