|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 1/3] x86/hvm: give HVMOP_set_param and HVMOP_get_param their own functions
On 01/05/15 20:19, Jan Beulich wrote: Paul Durrant <paul.durrant@xxxxxxxxxx> 05/01/15 4:05 PM >>>--- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -5638,6 +5638,299 @@ static int hvmop_set_evtchn_upcall_vector( return 0; }> Likely, yes.It is less clear whether this case would trigger it, but I know for certain that it dislikes "int rc = 0; rc = fn();" + if ( copy_from_guest(&a, arg, 1) ) + return -EFAULT; + + if ( a.index >= HVM_NR_PARAMS ) + return -EINVAL; + + d = rcu_lock_domain_by_any_id(a.domid); + if ( d == NULL ) + return -ESRCH; + + rc = -EINVAL;(Not used anywhere up from here.)+ if ( is_pvh_domain(d) + && (a.index != HVM_PARAM_CALLBACK_IRQ) ) + goto out;It would have been nice if you had corrected style issues like the misplaced && as you go; I'll try to remember to do so while committing (together with a few more and the adjustment for the issue above). I don't have the exact reference to hand (I am still travelling), but I expect not. Such a brace could be part of an if/else clause which would mean that it wasn't the only codepath to fall through. ~Andrew Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |