]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
ivshmem: print error on invalid peer id
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Tue, 23 Jun 2015 11:34:09 +0000 (13:34 +0200)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Sat, 24 Oct 2015 16:02:49 +0000 (18:02 +0200)
The server shouldn't send invalid peer id, so print an error if it's the
case.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Claudio Fontana <claudio.fontana@huawei.com>
hw/misc/ivshmem.c

index d7a00bd3836d6ea65cf9f0d83e96ddd54740f2a4..6ee48819975019973dfcc94c388d00c1f4a205eb 100644 (file)
@@ -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;
     }