From: Daniel Vetter <daniel@ffwll.ch>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: David Airlie <airlied@linux.ie>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
Thomas Hellstrom <thellstrom@vmware.com>,
Alex Deucher <alexander.deucher@amd.com>,
Daniel Stone <daniels@collabora.com>,
Sinclair Yeh <syeh@vmware.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [patch] drm/vmwgfx: fix a NULL dereference
Date: Thu, 28 Jan 2016 10:28:38 +0100 [thread overview]
Message-ID: <20160128092838.GT11240@phenom.ffwll.local> (raw)
In-Reply-To: <20160128090646.GA5824@mwanda>
On Thu, Jan 28, 2016 at 12:06:46PM +0300, Dan Carpenter wrote:
> We dereference "eaction->event" inside the call to drm_send_event_locked()
> so should hold off on setting it to NULL until afterward.
>
> Fixes: fb740cf2492c ("drm: Create drm_send_event helpers")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Oh dear that's embarassing. Thanks for the patch, applied.
-Daniel
>
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
> index e0edf14..37c305b 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
> @@ -880,8 +880,8 @@ static void vmw_event_fence_action_seq_passed(struct vmw_fence_action *action)
> }
>
> list_del_init(&eaction->fpriv_head);
> - eaction->event = NULL;
> drm_send_event_locked(dev, eaction->event);
> + eaction->event = NULL;
> spin_unlock_irqrestore(&dev->event_lock, irq_flags);
> }
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
prev parent reply other threads:[~2016-01-28 9:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-28 9:06 [patch] drm/vmwgfx: fix a NULL dereference Dan Carpenter
2016-01-28 9:28 ` Daniel Vetter [this message]
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=20160128092838.GT11240@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=dan.carpenter@oracle.com \
--cc=daniel.vetter@ffwll.ch \
--cc=daniels@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=syeh@vmware.com \
--cc=thellstrom@vmware.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox