projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d47effe
)
vhost: copy_from_user -> __copy_from_user
author
Michael S. Tsirkin
<mst@redhat.com>
Sun, 6 Mar 2011 11:33:49 +0000
(13:33 +0200)
committer
Michael S. Tsirkin
<mst@redhat.com>
Tue, 8 Mar 2011 16:03:05 +0000
(18:03 +0200)
copy_from_user is pretty high on perf top profile,
replacing it with __copy_from_user helps.
It's also safe because we do access_ok checks during setup.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vhost/vhost.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/vhost/vhost.c
b/drivers/vhost/vhost.c
index b0cc7f8ca4deadcf72379c8e6f3e41c6654370bd..2ab291241635d94278ff9f417b19223c265a044c 100644
(file)
--- a/
drivers/vhost/vhost.c
+++ b/
drivers/vhost/vhost.c
@@
-1171,7
+1171,7
@@
int vhost_get_vq_desc(struct vhost_dev *dev, struct vhost_virtqueue *vq,
i, vq->num, head);
return -EINVAL;
}
- ret = copy_from_user(&desc, vq->desc + i, sizeof desc);
+ ret =
__
copy_from_user(&desc, vq->desc + i, sizeof desc);
if (unlikely(ret)) {
vq_err(vq, "Failed to get descriptor: idx %d addr %p\n",
i, vq->desc + i);