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] [day] [month] [year] [list]
Message-ID: <20161019072504.GD20761@phenom.ffwll.local>
Date:   Wed, 19 Oct 2016 09:25:04 +0200
From:   Daniel Vetter <daniel@...ll.ch>
To:     Chris Wilson <chris@...is-wilson.co.uk>,
        Arnd Bergmann <arnd@...db.de>,
        Daniel Vetter <daniel.vetter@...el.com>,
        Jani Nikula <jani.nikula@...ux.intel.com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel.vetter@...ll.ch>,
        Ville Syrjälä 
        <ville.syrjala@...ux.intel.com>,
        Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
        Imre Deak <imre.deak@...el.com>,
        Ander Conselvan de Oliveira 
        <ander.conselvan.de.oliveira@...el.com>,
        intel-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org
Subject: Re: [Intel-gfx] [PATCH] i915: don't call drm_atomic_state_put on
 invalid pointer

On Tue, Oct 18, 2016 at 04:56:02PM +0100, Chris Wilson wrote:
> 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@...is-wilson.co.uk>
> > Cc: Daniel Vetter <daniel.vetter@...ll.ch>
> > Signed-off-by: Arnd Bergmann <arnd@...db.de>
> 
> Yup, missed that it jumps to fail before allocating state.
> 
> Function still looks a bit odd, but nvm
> Reviewed-by: Chris Wilson <chris@...is-wilson.co.uk>

Applied to drm-misc, thanks for the patch&review.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ