Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177796765
D61755.1795308798.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
770 B
Referenced Files
None
Subscribers
None
D61755.1795308798.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
@@ -750,7 +750,7 @@
gmap = mem->handle;
if (gmap == NULL ||
- (entry->end - entry->start) != (gmap->count * PAGE_SIZE)) {
+ OFF_TO_IDX(entry->end - entry->start) != gmap->count) {
rc = EINVAL;
goto out;
}
@@ -906,7 +906,7 @@
mtx_lock(&priv_user->user_data_lock);
RB_FOREACH(gmap, gmap_tree_head, &priv_user->gmap_tree) {
if (arg->index >= gmap->file_index &&
- arg->index < gmap->file_index + gmap->count * PAGE_SIZE) {
+ OFF_TO_IDX(arg->index - gmap->file_index) < gmap->count) {
if (gmap->notify == NULL)
gmap->notify = malloc(sizeof(*arg), M_GNTDEV,
M_WAITOK | M_ZERO);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 22, 12:53 AM (18 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41870360
Default Alt Text
D61755.1795308798.diff (770 B)
Attached To
Mode
D61755: xen/gntdev: fix boundary calculation overflow in
Attached
Detach File
Event Timeline