All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "Daniel Vetter" <daniel.vetter@intel.com>,
	"Jani Nikula" <jani.nikula@linux.intel.com>,
	"David Airlie" <airlied@linux.ie>,
	"Daniel Vetter" <daniel.vetter@ffwll.ch>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Imre Deak" <imre.deak@intel.com>,
	"Ander Conselvan de Oliveira"
	<ander.conselvan.de.oliveira@intel.com>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i915: don't call drm_atomic_state_put on invalid pointer
Date: Tue, 18 Oct 2016 16:56:02 +0100	[thread overview]
Message-ID: <20161018155602.GG29358@nuc-i3427.alporthouse.com> (raw)
In-Reply-To: <20161018151652.2690201-1-arnd@arndb.de>

On Tue, Oct 18, 2016 at 05:16:23PM +0200, Arnd Bergmann wrote:
> The introduction of reference counting on the state structures caused
> sanitize_watermarks() in i915 to break in the error handling case,
> as pointed out by gcc -Wmaybe-uninitialized
> 
> drivers/gpu/drm/i915/intel_display.c: In function ‘intel_modeset_init’:
> include/drm/drm_atomic.h:224:2: error: ‘state’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
> 
> This changes the function back to only drop the reference count
> when it was successfully allocated first.
> 
> Fixes: 0853695c3ba4 ("drm: Add reference counting to drm_atomic_state")
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Yup, missed that it jumps to fail before allocating state.

Function still looks a bit odd, but nvm
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

WARNING: multiple messages have this Message-ID (diff)
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Ander Conselvan de Oliveira
	<ander.conselvan.de.oliveira@intel.com>,
	David Airlie <airlied@linux.ie>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	Daniel Vetter <daniel.vetter@intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] i915: don't call drm_atomic_state_put on invalid pointer
Date: Tue, 18 Oct 2016 16:56:02 +0100	[thread overview]
Message-ID: <20161018155602.GG29358@nuc-i3427.alporthouse.com> (raw)
In-Reply-To: <20161018151652.2690201-1-arnd@arndb.de>

On Tue, Oct 18, 2016 at 05:16:23PM +0200, Arnd Bergmann wrote:
> The introduction of reference counting on the state structures caused
> sanitize_watermarks() in i915 to break in the error handling case,
> as pointed out by gcc -Wmaybe-uninitialized
> 
> drivers/gpu/drm/i915/intel_display.c: In function ‘intel_modeset_init’:
> include/drm/drm_atomic.h:224:2: error: ‘state’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
> 
> This changes the function back to only drop the reference count
> when it was successfully allocated first.
> 
> Fixes: 0853695c3ba4 ("drm: Add reference counting to drm_atomic_state")
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Yup, missed that it jumps to fail before allocating state.

Function still looks a bit odd, but nvm
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2016-10-18 15:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-18 15:16 [PATCH] i915: don't call drm_atomic_state_put on invalid pointer Arnd Bergmann
2016-10-18 15:29 ` Eric Engestrom
2016-10-18 15:29   ` Eric Engestrom
2016-10-18 15:56 ` Chris Wilson [this message]
2016-10-18 15:56   ` Chris Wilson
2016-10-19  7:25   ` [Intel-gfx] " Daniel Vetter
2016-10-19  7:25     ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161018155602.GG29358@nuc-i3427.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=airlied@linux.ie \
    --cc=ander.conselvan.de.oliveira@intel.com \
    --cc=arnd@arndb.de \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=ville.syrjala@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.