On Wed Feb 18 2015 10:29:40 AM CET, Jan Beulich <jbeul...@suse.com> wrote:
> > > > On 17.02.15 at 19:47, <tamas.leng...@zentific.com> wrote: > > On Tue, Feb 17, 2015 at 3:25 PM, Jan Beulich <jbeul...@suse.com> wrote: > > > > > > On 13.02.15 at 17:33, <tamas.leng...@zentific.com> 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@lists.xen.org http://lists.xen.org/xen-devel