[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH V5 10/12] xen/vm_event: Relocate memop checks
On Wed Feb 18 2015 10:29:40 AM CET, Jan Beulich <JBeulich@xxxxxxxx> wrote: > > > > On 17.02.15 at 19:47, <tamas.lengyel@xxxxxxxxxxxx> wrote: > > On Tue, Feb 17, 2015 at 3:25 PM, Jan Beulich <JBeulich@xxxxxxxx> wrote: > > > > > > On 13.02.15 at 17:33, <tamas.lengyel@xxxxxxxxxxxx> wrote: > > > > -int mem_paging_memop(struct domain *d, xen_mem_paging_op_t *mpo) > > > > +int mem_paging_memop(unsigned long cmd, > > > > +Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â > > > > XEN_GUEST_HANDLE_PARAM(xen_mem_paging_op_t) > > > > arg) { > > > > -Â Â Â int rc = -ENODEV; > > > > +Â Â Â int rc; > > > > +Â Â Â xen_mem_paging_op_t mpo; > > > > +Â Â Â struct domain *d; > > > > + > > > > +Â Â Â rc = -EFAULT; > > > > +Â Â Â if ( copy_from_guest(&mpo, arg, 1) ) > > > > +Â Â Â Â Â Â Â return rc; > > > > > > Please don't make things more complicated than they need to be: > > > You only use the -EFAULT once here, so no reason to assign it to > > > rc up front. > > > > This return will be a "goto out;" where the rcu is getting unlocked as > > well. > > How that? You didn't take the RCU lock yet (which is even visible > from the rest of the hunk above). > > Jan Sorry, was just replying mechanically as most returns here turn into goto outs. Ack. Tamas _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |