]> git.baikalelectronics.ru Git - kernel.git/commit
drm: fix uninitialized acquire_ctx fields (v2)
authorRob Clark <robdclark@gmail.com>
Sat, 7 Jun 2014 14:55:39 +0000 (10:55 -0400)
committerDave Airlie <airlied@redhat.com>
Thu, 19 Jun 2014 00:30:36 +0000 (10:30 +1000)
commit450960ddff3f8cc9aa322bdf6fef3b5e31880556
treebb51589db1d6f29400242e08145c10f934036670
parentea31063fff137dcf6c6b6d07e37d3ceae7ba2045
drm: fix uninitialized acquire_ctx fields (v2)

The acquire ctx will typically be declared on the stack, which means we
could have garbage values for any uninitialized field.  In this case, it
was triggering WARN_ON()s because 'contended' had garbage value.

Go ahead and use memset() to be more future-proof.

v2: now with extra brown paper bag

Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Tested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_modeset_lock.c