From nobody Fri Dec 19 06:31:14 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1599169504; cv=none; d=zohomail.com; s=zohoarc; b=PdQne1j6n1WSFLj/2Mz+67ZIqtcBgrTsOghkE6Nd98ZeakwzRVPqA+CxmR3A4M+I0V0qfWUXyXUxVkj83XsG6DlpN541My6yc+FhvfBc/+IGwD0EoNO3/1rWJlDE63zh2bn6skZXGBkONa3cF6F7BBwZshhQ4YdxV+eZXana2CE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599169504; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Gp/FZKkqU04XfSMs8F0HgQ0MGLufMuTTwBeTutB4Yfc=; b=nrxqMzeZtKsY81ODXVbYDN3OV8ii+LaqDqFx8/C9iBehsioG0e614ByZ6B1HI6puoAmrYEZBoNWuqwK4qsHRkKcbbMjr05f1zaSQcNZXoTIX/hvFyP73pYeGwvMxwLZ50EXOC3pUSAeiFKDiG+XDUdyrj6KHzlyDMMzfqZ7/9i8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 15991695048291007.2974015353163; Thu, 3 Sep 2020 14:45:04 -0700 (PDT) Received: from localhost ([::1]:54280 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDx2V-0006KE-Vc for importer@patchew.org; Thu, 03 Sep 2020 17:45:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59668) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDwMB-00053W-8I; Thu, 03 Sep 2020 17:01:19 -0400 Received: from mail-oi1-x22f.google.com ([2607:f8b0:4864:20::22f]:35412) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kDwM8-0007to-Dj; Thu, 03 Sep 2020 17:01:17 -0400 Received: by mail-oi1-x22f.google.com with SMTP id w16so4538889oia.2; Thu, 03 Sep 2020 14:01:15 -0700 (PDT) Received: from localhost (76-251-165-188.lightspeed.austtx.sbcglobal.net. [76.251.165.188]) by smtp.gmail.com with ESMTPSA id b188sm716337oif.19.2020.09.03.14.01.13 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 03 Sep 2020 14:01:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Gp/FZKkqU04XfSMs8F0HgQ0MGLufMuTTwBeTutB4Yfc=; b=W0dnaJxyLxEtYVUQkNBcw94SnTLexrnfXoacpK8hj4/14ekxTOCFZffjuQDrlQeMW8 8c8i842QBlTBGnNow3sEUpV5BErW9ozafWYrw2dHaQevhVdhDzlVb0yIGlOsCGe5cv0a vSYpy0BkznZl0/dKU8vE4FyCATkI5vd7bYj4XFg65GVCD88h+KkBUEcbk7dhH5138Iyj V92FJHMazdYjZs6551FWkQqFC+ZuFv6Fc9BcyfUAOzhHbE1hKWmLhVJyK5Y6meBVlDib qOWJuD9y8WqNyFateEEc0b7bF504PsjaxGfc/RkYT2jZOetX6mJVzS9j6sOoG9kvf3Ul /tEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Gp/FZKkqU04XfSMs8F0HgQ0MGLufMuTTwBeTutB4Yfc=; b=WrWv6qLbiOABhtJlmHrIOipMT3kqZ0W8j7qzbEHyrRsLxxefWz+B/C0BZKOxDHiTo4 jaPrPDheWn2CczoBaguINGTEOsr8fBoKFtdtJK2zThkdJ/kfNCvfeMtv+Qp/6dmFHIjj t4Tkljmjmhz6+Q7QebXa0J3Z98Bq6VcydOQpz8HK55XvHujBK/FGhyNwp39gTusf7Ij/ cWU5EsO9hQsz5fwWHoaWj7jnvbYiX1rqioFyVjLFJl+48qnEPlzP1HIC37RArzVxhcK1 oiI9+XYxiln6Dg7LSj1m58FZNRgOVrLcb5MqeHvwQzff8dDT6wXTRflkm0/AcSDtEv+o KK5w== X-Gm-Message-State: AOAM530ikzARdlk5EASjTQn87h2Bn5r12c4QWSb4QXxt9oVFtYK1eQSj uXoWlumRV7JNxIcms27NcGtQMRQ2Z3OUzQ== X-Google-Smtp-Source: ABdhPJw0FKmpIMmf8R4+W5pubrGUqPcTL8IfyihYyCD7YNqT4kGmUwWFFhU6u/JrT4d2nHddRYWlsQ== X-Received: by 2002:aca:4403:: with SMTP id r3mr823175oia.94.1599166874742; Thu, 03 Sep 2020 14:01:14 -0700 (PDT) From: Michael Roth To: qemu-devel@nongnu.org Subject: [PATCH 69/77] libvhost-user: Report descriptor index on panic Date: Thu, 3 Sep 2020 15:59:27 -0500 Message-Id: <20200903205935.27832-70-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200903205935.27832-1-mdroth@linux.vnet.ibm.com> References: <20200903205935.27832-1-mdroth@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::22f; envelope-from=flukshun@gmail.com; helo=mail-oi1-x22f.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-stable@nongnu.org, "Michael S . Tsirkin" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 We want to report the index of the descriptor, not its pointer. Fixes: 7b2e5c65f4 ("contrib: add libvhost-user") Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20200723171935.18535-1-philmd@redhat.com> Reviewed-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Raphael Norwitz Reviewed-by: Stefan Hajnoczi Cc: qemu-stable@nongnu.org Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin (cherry picked from commit 8fe9805c73c277dc2feeaa83de73d6a58bf23f39) Signed-off-by: Michael Roth --- contrib/libvhost-user/libvhost-user.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/libvhost-user/libvhost-user.c b/contrib/libvhost-user/= libvhost-user.c index 3bca996c62..301f6d68b3 100644 --- a/contrib/libvhost-user/libvhost-user.c +++ b/contrib/libvhost-user/libvhost-user.c @@ -1867,7 +1867,7 @@ virtqueue_get_head(VuDev *dev, VuVirtq *vq, =20 /* If their number is silly, that's a fatal mistake. */ if (*head >=3D vq->vring.num) { - vu_panic(dev, "Guest says index %u is available", head); + vu_panic(dev, "Guest says index %u is available", *head); return false; } =20 @@ -1926,7 +1926,7 @@ virtqueue_read_next_desc(VuDev *dev, struct vring_des= c *desc, smp_wmb(); =20 if (*next >=3D max) { - vu_panic(dev, "Desc next is %u", next); + vu_panic(dev, "Desc next is %u", *next); return VIRTQUEUE_READ_DESC_ERROR; } =20 --=20 2.17.1