linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Hellstrom <thellstrom@vmware.com>
To: Dave Jones <davej@redhat.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: vmwgfx: Fix unitialized stack read in vmw_setup_otable_base
Date: Wed, 05 Feb 2014 08:50:11 +0100	[thread overview]
Message-ID: <52F1ED33.9010109@vmware.com> (raw)
In-Reply-To: <20140131022725.GB11601@redhat.com>

On 01/31/2014 03:27 AM, Dave Jones wrote:
> One of the error paths in vmw_setup_otable_base causes us to return with
> 'ret' having never been set to anything causing us to return whatever was
> on the stack.
>
> Found with Coverity
>
> Signed-off-by: Dave Jones <davej@fedoraproject.org>
>
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_mob.c b/drivers/gpu/drm/vmwgfx/vmwgfx_mob.c
> index 4910e7b81811..d4a5a19cb8c3 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_mob.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_mob.c
> @@ -134,6 +134,7 @@ static int vmw_setup_otable_base(struct vmw_private *dev_priv,
>  	cmd = vmw_fifo_reserve(dev_priv, sizeof(*cmd));
>  	if (unlikely(cmd == NULL)) {
>  		DRM_ERROR("Failed reserving FIFO space for OTable setup.\n");
> +		ret = -ENOMEM;
>  		goto out_no_fifo;
>  	}
>  

Thanks,
Will queue on vmwgfx-fixes for -rc2.

/Thomas

      reply	other threads:[~2014-02-05  7:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-31  2:27 vmwgfx: Fix unitialized stack read in vmw_setup_otable_base Dave Jones
2014-02-05  7:50 ` Thomas Hellstrom [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=52F1ED33.9010109@vmware.com \
    --to=thellstrom@vmware.com \
    --cc=davej@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).