From nobody Fri May 3 02:21:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 154711235224786.27921366686292; Thu, 10 Jan 2019 01:25:52 -0800 (PST) Received: from localhost ([127.0.0.1]:37315 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ghWar-0003FY-41 for importer@patchew.org; Thu, 10 Jan 2019 04:25:41 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35597) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ghWZF-00028E-UP for qemu-devel@nongnu.org; Thu, 10 Jan 2019 04:24:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ghWZF-0001Y7-A3 for qemu-devel@nongnu.org; Thu, 10 Jan 2019 04:24:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47598) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ghWZF-0001Xa-3a for qemu-devel@nongnu.org; Thu, 10 Jan 2019 04:24:01 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 471B0C05D3E8 for ; Thu, 10 Jan 2019 09:24:00 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-203.ams2.redhat.com [10.36.116.203]) by smtp.corp.redhat.com (Postfix) with ESMTP id D94D55C579; Thu, 10 Jan 2019 09:23:56 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 0813948EF; Thu, 10 Jan 2019 10:23:56 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 10 Jan 2019 10:23:54 +0100 Message-Id: <20190110092355.7121-2-kraxel@redhat.com> In-Reply-To: <20190110092355.7121-1-kraxel@redhat.com> References: <20190110092355.7121-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 10 Jan 2019 09:24:00 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 1/2] hw/audio/marvell: Don't include unnecessary i2c.h header file X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Thomas Huth This device does not use I2C, so no need to include the header file here. Signed-off-by: Thomas Huth Message-Id: <1546614146-10525-1-git-send-email-thuth@redhat.com> Signed-off-by: Gerd Hoffmann --- hw/audio/marvell_88w8618.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/audio/marvell_88w8618.c b/hw/audio/marvell_88w8618.c index 6600ab4851..035dd76cbf 100644 --- a/hw/audio/marvell_88w8618.c +++ b/hw/audio/marvell_88w8618.c @@ -12,7 +12,6 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" #include "hw/hw.h" -#include "hw/i2c/i2c.h" #include "hw/audio/wm8750.h" #include "audio/audio.h" #include "qapi/error.h" --=20 2.9.3 From nobody Fri May 3 02:21:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1547112357225591.0655438151246; Thu, 10 Jan 2019 01:25:57 -0800 (PST) Received: from localhost ([127.0.0.1]:37321 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ghWar-0003G7-2T for importer@patchew.org; Thu, 10 Jan 2019 04:25:41 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35595) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ghWZF-00028D-Pw for qemu-devel@nongnu.org; Thu, 10 Jan 2019 04:24:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ghWZF-0001Xx-5f for qemu-devel@nongnu.org; Thu, 10 Jan 2019 04:24:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36340) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ghWZE-0001XY-WC for qemu-devel@nongnu.org; Thu, 10 Jan 2019 04:24:01 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 588FF20B09 for ; Thu, 10 Jan 2019 09:24:00 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-203.ams2.redhat.com [10.36.116.203]) by smtp.corp.redhat.com (Postfix) with ESMTP id D8C8B672C2; Thu, 10 Jan 2019 09:23:56 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 10C399AD3; Thu, 10 Jan 2019 10:23:56 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 10 Jan 2019 10:23:55 +0100 Message-Id: <20190110092355.7121-3-kraxel@redhat.com> In-Reply-To: <20190110092355.7121-1-kraxel@redhat.com> References: <20190110092355.7121-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 10 Jan 2019 09:24:00 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 2/2] usb-audio: ignore usb packages with wrong size X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" usb packets with no payload (zero length) seem to happen in practice for whatever reason. Add a check and skip the packet then, otherwise we'll trigger an assert. Reported-by: Leonardo Soares M=C3=BCller Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20181211072649.20700-1-kraxel@redhat.com --- hw/usb/dev-audio.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/usb/dev-audio.c b/hw/usb/dev-audio.c index ee43e4914d..28ac7c5165 100644 --- a/hw/usb/dev-audio.c +++ b/hw/usb/dev-audio.c @@ -321,6 +321,9 @@ static int streambuf_put(struct streambuf *buf, USBPack= et *p) if (!free) { return 0; } + if (p->iov.size !=3D USBAUDIO_PACKET_SIZE) { + return 0; + } assert(free >=3D USBAUDIO_PACKET_SIZE); usb_packet_copy(p, buf->data + (buf->prod % buf->size), USBAUDIO_PACKET_SIZE); --=20 2.9.3