Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102893950
D43145.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
768 B
Referenced Files
None
Subscribers
None
D43145.diff
View Options
diff --git a/sys/dev/xen/gntdev/gntdev.c b/sys/dev/xen/gntdev/gntdev.c
--- a/sys/dev/xen/gntdev/gntdev.c
+++ b/sys/dev/xen/gntdev/gntdev.c
@@ -383,6 +383,13 @@
}
}
+ /* Copy the output values. */
+ arg->index = file_offset;
+ for (i = 0; error == 0 && i < arg->count; i++) {
+ if (suword32(&arg->gref_ids[i], grefs[i].gref_id) != 0)
+ error = EFAULT;
+ }
+
if (error != 0) {
/*
* If target domain maps the gref (by guessing the gref-id),
@@ -401,11 +408,6 @@
return (error);
}
- /* Copy the output values. */
- arg->index = file_offset;
- for (i = 0; i < arg->count; i++)
- suword32(&arg->gref_ids[i], grefs[i].gref_id);
-
/* Modify the per user private data. */
mtx_lock(&priv_user->user_data_lock);
for (i = 0; i < arg->count; i++)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 19, 10:18 AM (21 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14714734
Default Alt Text
D43145.diff (768 B)
Attached To
Mode
D43145: gntdev: Handle errors from suword32() in gntdev_alloc_gref()
Attached
Detach File
Event Timeline
Log In to Comment