Received: from eggs.gnu.org ([2001:4830:134:3::10]:45366) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjnDI-0006nG-5z for qemu-devel@nongnu.org; Tue, 13 Sep 2016 08:53:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bjnDE-0008Dp-1H for qemu-devel@nongnu.org; Tue, 13 Sep 2016 08:53:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36124) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjnDD-0008DX-S4 for qemu-devel@nongnu.org; Tue, 13 Sep 2016 08:53:19 -0400 Date: Tue, 13 Sep 2016 18:23:12 +0530 (IST) From: P J P In-Reply-To: <8E89EAFA-7D8A-4108-9EBD-B9BE9E5C87F5@daynix.com> Message-ID: References: <1473184397-27900-1-git-send-email-ppandit@redhat.com> <7D125827-164E-43FF-A80F-8B8908D9B2EE@daynix.com> <8E89EAFA-7D8A-4108-9EBD-B9BE9E5C87F5@daynix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Subject: Re: [Qemu-devel] [PATCH v3] scsi: pvscsi: avoid infinite loop while building SG list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Dmitry Fleytman Cc: Paolo Bonzini , Qemu Developers , Li Qiang Hello Dmitry, +-- On Tue, 13 Sep 2016, Dmitry Fleytman wrote --+ | It should be in the same patch because otherwise a broken logic will be | introduced. Not even same patch-set? | pvscsi_build_sglist() must perform all rollback actions required to handle | the error cleanly. Please also note that pvscsi_build_sglist() caller(s) | should be aware of SG list creation failure and handle this error scenario | accordingly. I see. All callers leading up to 'pvscsi_convert_sglist' appear to be returning void. MemoryRegionOps pvscsi_ops = { .write = pvscsi_io_write -> pvscsi_io_write -> pvscsi_process_io ->pvscsi_process_request_descriptor -> pvscsi_build_sglist -> pvscsi_convert_sglist This looks to be a big patch to fix an infinite loop issue. It'll help to separate the two patches, no? Thank you. -- Prasad J Pandit / Red Hat Product Security Team 47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F