From: Wei Liu Subject: Re: [PATCH v4 01/31] libxl: fix libxl__build_hvm error handling Date: Fri, 7 Aug 2015 12:43:04 +0100 Message-ID: <20150807114304.GH6005@zion.uk.xensource.com> References: <1438942688-7610-1-git-send-email-roger.pau@citrix.com> <1438942688-7610-2-git-send-email-roger.pau@citrix.com> <20150807104922.GD6005@zion.uk.xensource.com> <55C48E99.3050606@citrix.com> <20150807110317.GF6005@zion.uk.xensource.com> <55C49660.7010808@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZNg3L-0000hz-HP for xen-devel@lists.xenproject.org; Fri, 07 Aug 2015 11:43:11 +0000 Content-Disposition: inline In-Reply-To: <55C49660.7010808@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Roger Pau =?iso-8859-1?Q?Monn=E9?= Cc: xen-devel@lists.xenproject.org, Ian Campbell , Wei Liu , Ian Jackson , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Fri, Aug 07, 2015 at 01:28:32PM +0200, Roger Pau Monn=E9 wrote: > El 07/08/15 a les 13.03, Wei Liu ha escrit: > > On Fri, Aug 07, 2015 at 12:55:21PM +0200, Roger Pau Monn=E9 wrote: > >> El 07/08/15 a les 12.49, Wei Liu ha escrit: > >>> On Fri, Aug 07, 2015 at 12:17:38PM +0200, Roger Pau Monne wrote: > >>>> With the current code in libxl__build_hvm it is possible for the fun= ction to > >>>> fail and still return 0. > > = > > I care about this bit, which states clearly there is a bug that needs > > fixing. > = > There are a bunch of error paths in this function that needs fixing, > every error path below the call to libxl__domain_device_construct_rdm > will simply return with rc =3D 0, because the return code of the functions > is stored in ret, but the return code for libxl__build_hvm is fetched > from rc. > = I see. Arguably that's a bug in RDM series. Not a regression. And I think I should post a two-liner patch to change rc to ret. This would be a short bug fix for 4.6. That would then make your patch a pure refactoring patch and be ready to be applied for 4.7. The other option is to apply this patch for 4.6. Since you didn't tag this patch for-4.6, I didn't have that thought at the time I saw it. Which way do you prefer? If you want the latter please resend this single patch, reword the commit message to make it clearer. Wei.