From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53043) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeOXq-00068L-KY for qemu-devel@nongnu.org; Tue, 22 Sep 2015 10:27:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZeOXn-00070z-8B for qemu-devel@nongnu.org; Tue, 22 Sep 2015 10:27:46 -0400 Received: from lhrrgout.huawei.com ([194.213.3.17]:28588) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeOXm-0006yK-W7 for qemu-devel@nongnu.org; Tue, 22 Sep 2015 10:27:43 -0400 References: <1442333283-13119-1-git-send-email-marcandre.lureau@redhat.com> <1442333283-13119-20-git-send-email-marcandre.lureau@redhat.com> From: Claudio Fontana Message-ID: <5601655B.2060207@huawei.com> Date: Tue, 22 Sep 2015 16:27:39 +0200 MIME-Version: 1.0 In-Reply-To: <1442333283-13119-20-git-send-email-marcandre.lureau@redhat.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v3 19/46] ivshmem: print error on invalid peer id List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: marcandre.lureau@redhat.com, qemu-devel@nongnu.org Cc: drjones@redhat.com, cam@cs.ualberta.ca, stefanha@redhat.com On 15.09.2015 18:07, marcandre.lureau@redhat.com wrote: > From: Marc-André Lureau > > The server shouldn't send invalid peer id, so print an error if it's the > case. > > Signed-off-by: Marc-André Lureau > --- > hw/misc/ivshmem.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c > index 52e1e63..1c98ec3 100644 > --- a/hw/misc/ivshmem.c > +++ b/hw/misc/ivshmem.c > @@ -399,6 +399,7 @@ static void close_guest_eventfds(IVShmemState *s, int posn) > return; > } > if (posn < 0 || posn >= s->nb_peers) { > + error_report("invalid peer %d", posn); > return; > } > > Reviewed-by: Claudio Fontana