diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c index 107b000..337e17a 100644 --- a/xen/common/grant_table.c +++ b/xen/common/grant_table.c @@ -1852,10 +1852,9 @@ __acquire_grant_for_copy( PIN_FAIL(unlock_out, GNTST_general_error, "remote grant table not ready\n"); - if ( unlikely(gref >= nr_grant_entries(rgt)) ) - PIN_FAIL(unlock_out, GNTST_bad_gntref, - "Bad grant reference %ld\n", gref); - + if ( unlikely(gref >= nr_grant_entries(rgt)) ){ + PIN_FAIL(unlock_out, GNTST_bad_gntref, "Bad grant reference %ld gt_version:%d ldom:%d readonly:%d allow_transitive:%d\n", gref, rgt->gt_version, ldom, readonly, allow_transitive); + } act = &active_entry(rgt, gref); shah = shared_entry_header(rgt, gref); if ( rgt->gt_version == 1 ) @@ -2071,8 +2070,10 @@ __gnttab_copy( current->domain->domain_id, 1, &s_frame, &s_pg, &source_off, &source_len, 1); - if ( rc != GNTST_okay ) - goto error_out; + if ( rc != GNTST_okay ){ + gdprintk(XENLOG_WARNING, "acquire_grant_for_copy failed .. src_is_gref rc:%d source.domid:%d dest.domid:%d s_frame:%ld source_off:%u source_len:%u op->source.offset:%d op->len:%d\n", rc, op->source.domid, op->dest.domid, s_frame, source_off, source_len, op->source.offset, op->len); + goto error_out; + } have_s_grant = 1; if ( op->source.offset < source_off || op->len > source_len ) @@ -2095,8 +2096,10 @@ __gnttab_copy( rc = __acquire_grant_for_copy(dd, op->dest.u.ref, current->domain->domain_id, 0, &d_frame, &d_pg, &dest_off, &dest_len, 1); - if ( rc != GNTST_okay ) - goto error_out; + if ( rc != GNTST_okay ){ + gdprintk(XENLOG_WARNING, "acquire_grant_for_copy failed .. dest_is_gref rc:%d source.domid:%d dest.domid:%d s_frame:%ld source_off:%u source_len:%u op->source.offset:%d op->len:%d\n", rc, op->source.domid, op->dest.domid, s_frame, dest_off, dest_len, op->dest.offset, op->len); + goto error_out; + } have_d_grant = 1; if ( op->dest.offset < dest_off || op->len > dest_len )