From: Thomas Hellstrom <thellstrom@vmware.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Dave Airlie <airlied@redhat.com>,
kernel-janitors@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [patch] vmwgfx: return -EFAULT instead of number of bytes remaining
Date: Tue, 18 Oct 2011 08:37:06 +0200 [thread overview]
Message-ID: <4E9D1E92.5010001@vmware.com> (raw)
In-Reply-To: <20111018060919.GC27732@elgon.mountain>
On 10/18/2011 08:09 AM, Dan Carpenter wrote:
> The intent here was to return an error code, but instead the code
> returns the number of bytes remaining (that weren't copied).
>
> Signed-off-by: Dan Carpenter<dan.carpenter@oracle.com>
>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c
> index 97f23ab..3f63435 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c
> @@ -150,6 +150,7 @@ int vmw_present_ioctl(struct drm_device *dev, void *data,
> ret = copy_from_user(clips, clips_ptr, num_clips * sizeof(*clips));
> if (ret) {
> DRM_ERROR("Failed to copy clip rects from userspace.\n");
> + ret = -EFAULT;
> goto out_no_copy;
> }
>
> @@ -241,6 +242,7 @@ int vmw_present_readback_ioctl(struct drm_device *dev, void *data,
> ret = copy_from_user(clips, clips_ptr, num_clips * sizeof(*clips));
> if (ret) {
> DRM_ERROR("Failed to copy clip rects from userspace.\n");
> + ret = -EFAULT;
> goto out_no_copy;
> }
>
>
prev parent reply other threads:[~2011-10-18 6:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-18 6:09 [patch] vmwgfx: return -EFAULT instead of number of bytes remaining Dan Carpenter
2011-10-18 6:37 ` 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=4E9D1E92.5010001@vmware.com \
--to=thellstrom@vmware.com \
--cc=airlied@redhat.com \
--cc=dan.carpenter@oracle.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@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