From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH for-4.5 1/3] python/xc: Fix multiple issues in pyflask_context_to_sid() Date: Tue, 9 Dec 2014 11:20:48 -0500 Message-ID: <20141209162048.GB9585@laptop.dumpdata.com> References: <1417091674-8163-1-git-send-email-andrew.cooper3@citrix.com> <1417091674-8163-2-git-send-email-andrew.cooper3@citrix.com> <1417174620.23604.12.camel@citrix.com> <1418135262.14361.65.camel@citrix.com> <54870780.7040801@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <54870780.7040801@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: Andrew Cooper Cc: Wei Liu , Ian Jackson , Ian Campbell , Xen Coverity Team , Xen-devel List-Id: xen-devel@lists.xenproject.org On Tue, Dec 09, 2014 at 02:30:24PM +0000, Andrew Cooper wrote: > On 09/12/14 14:27, Ian Campbell wrote: > > On Fri, 2014-11-28 at 11:37 +0000, Ian Campbell wrote: > >> On Thu, 2014-11-27 at 12:34 +0000, Andrew Cooper wrote: > >>> The error handling from a failed memory allocation should return > >>> PyErr_SetFromErrno(xc_error_obj); rather than simply calling it and continuing > >>> to the memcpy() below, with the dest pointer being NULL. > >>> > >>> Furthermore, the context string is simply an input parameter to the hypercall, > >>> and is not mutated anywhere along the way. The error handling elsewhere in > >>> the function can be simplified by not duplicating it to start with. > >>> > >>> Signed-off-by: Andrew Cooper > >>> Coverity-IDs: 1055305 1055721 > >>> CC: Ian Campbell > >>> CC: Ian Jackson > >>> CC: Wei Liu > >>> CC: Xen Coverity Team > >> Acked-by: Ian Campbell > >> > >> This would have been far more obviously correct for 4.5 if you had stuck > >> to fixing the issue in the first paragraph. > > Konrad, given > > http://article.gmane.org/gmane.comp.emulators.xen.devel/224881 does this > > have a release ack? > > > > Ian. > > > > I can resubmit with a clearer description if that would help clarity, > but the code is correct for the fixes (not fantastically well) described. Please do - that is all I was waiting for. Thank you. > > ~Andrew