From patchwork Fri Jun 26 14:49:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Patchwork-Id: 488887 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D6E471400A0 for ; Sat, 27 Jun 2015 01:12:53 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=pdq4yyDa; dkim-atps=neutral Received: from localhost ([::1]:60616 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z8VJD-0001F5-Vc for incoming@patchwork.ozlabs.org; Fri, 26 Jun 2015 11:12:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57253) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z8Uxr-00051h-5t for qemu-devel@nongnu.org; Fri, 26 Jun 2015 10:50:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z8Uxq-0002Jj-1t for qemu-devel@nongnu.org; Fri, 26 Jun 2015 10:50:47 -0400 Received: from mail-qk0-x231.google.com ([2607:f8b0:400d:c09::231]:33552) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z8Uxp-0002JW-U1 for qemu-devel@nongnu.org; Fri, 26 Jun 2015 10:50:45 -0400 Received: by qkhu186 with SMTP id u186so56278067qkh.0 for ; Fri, 26 Jun 2015 07:50:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=5cnnKfukKdQ7UTxqcc0ERmmrQLUmxtbylZAgELnLTRI=; b=pdq4yyDaH4jMqbj2vPgzQ4lzVQRbO5Lln5RofeQri3vcsx6jBQ2xmf4X1U38b6PnNq oQWkdtBj6k9gTRBGvjLEGc2KZ3zwtfRv3EOBPJzbuTC1Pow/uRu1icD3nRJhKvYAVU2h 349Af1xUG+A+eqYfAfIyY1xyZLwaiRRrRoWjpzFKY8fGPAXXG7UegKLT43YsP6dXlF34 vFig1TiVbp9jDPCEs7eaHWi7qQ8AmEwjqvtMhj9k4e6OP5iNlcJv3yfpzcdK6ReJur3z NUfjYCwzUbIEnDvEjdRxl8fTBJC/f7HmdPoAQuw9udFl8LwlYhI/Hd/QkFMfvl4OF5Ie Z2uQ== X-Received: by 10.55.31.223 with SMTP id n92mr4337642qkh.77.1435330245571; Fri, 26 Jun 2015 07:50:45 -0700 (PDT) Received: from localhost (bne75-h02-31-39-163-232.dsl.sta.abo.bbox.fr. [31.39.163.232]) by mx.google.com with ESMTPSA id d9sm5888456qga.6.2015.06.26.07.50.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Jun 2015 07:50:44 -0700 (PDT) From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Fri, 26 Jun 2015 16:49:23 +0200 Message-Id: <1435330185-23248-18-git-send-email-marcandre.lureau@gmail.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1435330185-23248-1-git-send-email-marcandre.lureau@gmail.com> References: <1435330185-23248-1-git-send-email-marcandre.lureau@gmail.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c09::231 Cc: cam@cs.ualberta.ca, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , stefanha@redhat.com Subject: [Qemu-devel] [PATCH 17/39] ivshmem: print error on invalid peer id X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 ab13f70..17dc122 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; }