From: "Jan Beulich" Subject: Re: [PATCH v3 10/19] xen: handle XENMEM_get_vnumainfo in compat_memory_op Date: Tue, 13 Jan 2015 16:41:18 +0000 Message-ID: <54B558BE020000780005483B@mail.emea.novell.com> References: <1421151107-20842-1-git-send-email-wei.liu2@citrix.com> <1421151107-20842-11-git-send-email-wei.liu2@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1421151107-20842-11-git-send-email-wei.liu2@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei Liu Cc: dario.faggioli@citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 13.01.15 at 13:11, wrote: > rc = do_memory_op(cmd, nat.hnd); > + if ( rc == -ENOBUFS && op == XENMEM_get_vnumainfo ) > + { > + cmp.vnuma.nr_vnodes = nat.vnuma->nr_vnodes; > + cmp.vnuma.nr_vcpus = nat.vnuma->nr_vcpus; > + cmp.vnuma.nr_vmemranges = nat.vnuma->nr_vmemranges; > + if ( __copy_to_guest(compat, &cmp.vnuma, 1) ) > + rc = -EFAULT; > + } > if ( rc < 0 ) > break; Please move the new if() inside the body of the existing one. Ack with that change. Jan