From: Dan Carpenter <error27@gmail.com>
To: David Airlie <airlied@linux.ie>
Cc: "Thomas Hellstrom" <thellstrom@vmware.com>,
kernel-janitors@vger.kernel.org, dri-devel@lists.freedesktop.org,
"Jerome Glisse" <jglisse@redhat.com>,
"Michel Dänzer" <daenzer@vmware.com>,
"Dave Airlie" <airlied@redhat.com>
Subject: [patch] drm/ttm: return -EFAULT on copy_to_user error
Date: Thu, 03 Jun 2010 09:57:55 +0000 [thread overview]
Message-ID: <20100603095755.GQ5483@bicker> (raw)
copy_to/from_user() returns the number of bytes remaining and this
function normally returns negative error codes. No one uses the
ttm_bo_fbdev_io() function so this change has no impact.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c b/drivers/gpu/drm/ttm/ttm_bo_vm.c
index fe6cb77..fe4a25a 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_vm.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_vm.c
@@ -444,7 +444,7 @@ ssize_t ttm_bo_fbdev_io(struct ttm_buffer_object *bo, const char __user *wbuf,
ttm_bo_unref(&bo);
if (unlikely(ret != 0))
- return ret;
+ return -EFAULT;
*f_pos += io_size;
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <error27@gmail.com>
To: David Airlie <airlied@linux.ie>
Cc: "Thomas Hellstrom" <thellstrom@vmware.com>,
kernel-janitors@vger.kernel.org, dri-devel@lists.freedesktop.org,
"Jerome Glisse" <jglisse@redhat.com>,
"Michel Dänzer" <daenzer@vmware.com>,
"Dave Airlie" <airlied@redhat.com>
Subject: [patch] drm/ttm: return -EFAULT on copy_to_user error
Date: Thu, 3 Jun 2010 11:57:55 +0200 [thread overview]
Message-ID: <20100603095755.GQ5483@bicker> (raw)
copy_to/from_user() returns the number of bytes remaining and this
function normally returns negative error codes. No one uses the
ttm_bo_fbdev_io() function so this change has no impact.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c b/drivers/gpu/drm/ttm/ttm_bo_vm.c
index fe6cb77..fe4a25a 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_vm.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_vm.c
@@ -444,7 +444,7 @@ ssize_t ttm_bo_fbdev_io(struct ttm_buffer_object *bo, const char __user *wbuf,
ttm_bo_unref(&bo);
if (unlikely(ret != 0))
- return ret;
+ return -EFAULT;
*f_pos += io_size;
next reply other threads:[~2010-06-03 9:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-03 9:57 Dan Carpenter [this message]
2010-06-03 9:57 ` [patch] drm/ttm: return -EFAULT on copy_to_user error Dan Carpenter
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=20100603095755.GQ5483@bicker \
--to=error27@gmail.com \
--cc=airlied@linux.ie \
--cc=airlied@redhat.com \
--cc=daenzer@vmware.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jglisse@redhat.com \
--cc=kernel-janitors@vger.kernel.org \
--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 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.