[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] common/gnttab: gnttab_query_size() cleanup
commit f0cd93c2a85562b66e86c78c49335c14613c9e76 Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Tue Jun 20 10:40:56 2017 +0100 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Tue Aug 15 15:08:57 2017 +0100 common/gnttab: gnttab_query_size() cleanup Drop pointless debugging messages, and reduce variable scope. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> --- xen/common/grant_table.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c index b97d2b9..49a18e8 100644 --- a/xen/common/grant_table.c +++ b/xen/common/grant_table.c @@ -1713,30 +1713,24 @@ gnttab_query_size( { struct gnttab_query_size op; struct domain *d; - int rc; if ( count != 1 ) return -EINVAL; - if ( unlikely(copy_from_guest(&op, uop, 1) != 0) ) - { - gdprintk(XENLOG_INFO, "Fault while reading gnttab_query_size_t.\n"); + if ( unlikely(copy_from_guest(&op, uop, 1)) ) return -EFAULT; - } d = rcu_lock_domain_by_any_id(op.dom); if ( d == NULL ) { - gdprintk(XENLOG_INFO, "Bad domid %d.\n", op.dom); op.status = GNTST_bad_domain; - goto query_out; + goto out; } - rc = xsm_grant_query_size(XSM_TARGET, current->domain, d); - if ( rc ) + if ( xsm_grant_query_size(XSM_TARGET, current->domain, d) ) { op.status = GNTST_permission_denied; - goto query_out_unlock; + goto out; } grant_read_lock(d->grant_table); @@ -1747,11 +1741,10 @@ gnttab_query_size( grant_read_unlock(d->grant_table); + out: + if ( d ) + rcu_unlock_domain(d); - query_out_unlock: - rcu_unlock_domain(d); - - query_out: if ( unlikely(__copy_to_guest(uop, &op, 1)) ) return -EFAULT; -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |