lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <285856d8-ae1c-b86a-36f4-f5ffa6ae6db7@message-id.googlemail.com>
Date:   Sun, 15 Jan 2017 14:53:38 +0100
From:   Stefan Seyfried <stefan.seyfried@...glemail.com>
To:     Chris Wilson <chris@...is-wilson.co.uk>,
        linux-kernel@...r.kernel.org
Cc:     intel-gfx@...ts.freedesktop.org,
        Daniel Vetter <daniel.vetter@...ll.ch>,
        Jani Nikula <jani.nikula@...ux.intel.com>,
        "# v4 . 10-rc1+" <drm-intel-fixes@...ts.freedesktop.org>
Subject: Re: [PATCH] drm/i915: Avoid drm_atomic_state_put(NULL) in
 intel_display_resume

Hi Chris,

this fixes the problem for me, thanks!

Tested-by: Stefan Seyfried <stefan.seyfried@...glemail.com>

Am 15.01.2017 um 13:58 schrieb Chris Wilson:
> intel_display_resume() may be called without a atomic state to restore,
> i.e. dev_priv->modeset_reset_restore state is NULL. One such case is
> following a lid open/close event and the forced modeset in
> intel_lid_notiy().
> 
> Reported-by: Stefan Seyfried <stefan.seyfried@...glemail.com>
> Fixes: 0853695c3ba4 ("drm: Add reference counting to drm_atomic_state")
> Signed-off-by: Chris Wilson <chris@...is-wilson.co.uk>
> Cc: Daniel Vetter <daniel.vetter@...ll.ch>
> Cc: Jani Nikula <jani.nikula@...ux.intel.com>
> Cc: <drm-intel-fixes@...ts.freedesktop.org> # v4.10-rc1+
> ---
>  drivers/gpu/drm/i915/intel_display.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 3dc8724df400..260bbe8881e6 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -17024,7 +17024,8 @@ void intel_display_resume(struct drm_device *dev)
>  
>  	if (ret)
>  		DRM_ERROR("Restoring old state failed with %i\n", ret);
> -	drm_atomic_state_put(state);
> +	if (state)
> +		drm_atomic_state_put(state);
>  }
>  
>  void intel_modeset_gem_init(struct drm_device *dev)

-- 
Stefan Seyfried

"For a successful technology, reality must take precedence over
 public relations, for nature cannot be fooled." -- Richard Feynman

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ