Re: [Intel-gfx] [PATCH] drm/i915: Avoid drm_atomic_state_put(NULL) on error paths

2017-01-18 Thread Chris Wilson
On Wed, Jan 18, 2017 at 12:49:00PM +, Chris Wilson wrote: > On Wed, Jan 18, 2017 at 02:34:28PM +0200, Ander Conselvan de Oliveira wrote: > > The error paths in hsw_trans_edp_pipe_A_crc_wa() and > > intel_prepare_reset() would potentially call drm_atomic_state_put with a > > NULL state, which wo

Re: [Intel-gfx] [PATCH] drm/i915: Avoid drm_atomic_state_put(NULL) on error paths

2017-01-18 Thread Chris Wilson
On Wed, Jan 18, 2017 at 02:34:28PM +0200, Ander Conselvan de Oliveira wrote: > The error paths in hsw_trans_edp_pipe_A_crc_wa() and > intel_prepare_reset() would potentially call drm_atomic_state_put with a > NULL state, which would lead to a NULL pointer dereference. > > Found by coverity. > > v

[Intel-gfx] [PATCH] drm/i915: Avoid drm_atomic_state_put(NULL) on error paths

2017-01-18 Thread Ander Conselvan de Oliveira
The error paths in hsw_trans_edp_pipe_A_crc_wa() and intel_prepare_reset() would potentially call drm_atomic_state_put with a NULL state, which would lead to a NULL pointer dereference. Found by coverity. v2: Improve the error paths. (Chris) Fixes: 0853695c3ba4 ("drm: Add reference counting to d

Re: [Intel-gfx] [PATCH] drm/i915: Avoid drm_atomic_state_put(NULL) on error paths

2017-01-18 Thread Chris Wilson
On Wed, Jan 18, 2017 at 01:52:15PM +0200, Ander Conselvan de Oliveira wrote: > The error paths in hsw_trans_edp_pipe_A_crc_wa() and > intel_prepare_reset() would potentially call drm_atomic_state_put with a > NULL state, which would lead to a NULL pointer dereference. > > Found by coverity. > > F

[Intel-gfx] [PATCH] drm/i915: Avoid drm_atomic_state_put(NULL) on error paths

2017-01-18 Thread Ander Conselvan de Oliveira
The error paths in hsw_trans_edp_pipe_A_crc_wa() and intel_prepare_reset() would potentially call drm_atomic_state_put with a NULL state, which would lead to a NULL pointer dereference. Found by coverity. Fixes: 0853695c3ba4 ("drm: Add reference counting to drm_atomic_state") Cc: Chris Wilson Cc