From: Ian Campbell Subject: Re: [PATCH] libxc/unlz4: always set an error return code on failures Date: Tue, 28 Jan 2014 11:49:47 +0000 Message-ID: <1390909787.7753.67.camel@kazak.uk.xensource.com> References: <1383870390-9273-1-git-send-email-mattjd@gmail.com> <1383870390-9273-2-git-send-email-mattjd@gmail.com> <52E22BE1020000780011673E@nat28.tlf.novell.com> <1390555374.2124.7.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1W87Au-0000nW-56 for xen-devel@lists.xenproject.org; Tue, 28 Jan 2014 11:49:52 +0000 In-Reply-To: <1390555374.2124.7.camel@kazak.uk.xensource.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: Jan Beulich Cc: xen-devel@lists.xenproject.org, Matthew Daley , Ian Jackson List-Id: xen-devel@lists.xenproject.org On Fri, 2014-01-24 at 09:22 +0000, Ian Campbell wrote: > On Fri, 2014-01-24 at 08:01 +0000, Jan Beulich wrote: > > "ret", being set to -1 early on, gets cleared by the first invocation > > of lz4_decompress()/lz4_decompress_unknownoutputsize(), and hence > > subsequent failures wouldn't be noticed by the caller without setting > > it back to -1 right after those calls. > > > > Linux commit: 2a1d689c9ba42a6066540fb221b6ecbd6298b728 > > > > Reported-by: Matthew Daley > > Signed-off-by: Jan Beulich > > Acked-by: Ian Campbell This is a pretty obvious bug fix, which is already in Linux (where this code originates), so I've applied it. I guess you will do the Xen side one yourself. Ian.