From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael J Coss Subject: Re: [PATCH] x86: add an extra check when validating a huge pv L2 entry Date: Wed, 09 Sep 2009 12:15:42 -0400 Message-ID: <4AA7D4AE.7080606@alcatel-lucent.com> References: <4AA7E3A90200007800014295@vpn.id2.novell.com> <4AA7EB3902000078000142CB@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4AA7EB3902000078000142CB@vpn.id2.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org Jan Beulich wrote: >>>> Keir Fraser 09.09.09 17:35 >>> >>>> >> On 09/09/2009 16:19, "Jan Beulich" wrote: >> >> >>> - rc = get_data_page(mfn_to_page(m), d, writeable); >>> + if ( mfn_valid(m) ) >>> + rc = get_data_page(mfn_to_page(m), d, writeable); >>> + else >>> + rc = -EINVAL; >>> >> 'else rc = 0' would be more like it, eh? >> > > Oh, yes - I got confused (again) by the inconsistencies in what return > values mean for the various functions. > > Jan > I don't think that that's correct. The else clause is for the mfn_valid(m) failure case, and it seems appropriate to set the rc to some non-zero value. ---Michael J Coss