From nobody Thu Dec 18 22:20:18 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1678173328; cv=none; d=zohomail.com; s=zohoarc; b=GBgecikAkRxXZxt+2Qp5JqS0ZDH77GLgTF7BS1yNYHG6+tWUoB89NxmbbgboQqeD+gAEH9oUK62BoSoDeVNvyHjsM3wdtteQYyiZJL10iZaR6H4Ma1dpsxAFInd3uesh1OPBbuxR4NWrjNcTFZwUUPAmAvLwejHubXaeh+mXlHQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678173328; 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=gjIx5SDMpja5GbvEXMQBJLPSstUi91acpPGFpSp1+NU=; b=RPcvxpqv/a2UOWN+AyIuUzd5JhhzvyI4Ul2i1w1zMtVTk5jeRs3Cy69uXMewYvdVVTMlAduJKGCAZsr5obSR+z5z0KAlr8K1VxSzR8grA6rqmNbm0M0TZ/N3YPUyosLLxi8t3wPLc0HARYzBIxPj0y77W4L+IJNNNU54F+VTDFQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1678173328236392.4361893099234; Mon, 6 Mar 2023 23:15:28 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pZRSl-0002Yx-TF; Tue, 07 Mar 2023 02:10:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pZRSh-0002Ei-TW for qemu-devel@nongnu.org; Tue, 07 Mar 2023 02:10:15 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pZRSg-0005ju-65 for qemu-devel@nongnu.org; Tue, 07 Mar 2023 02:10:15 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-507-BgMJ6z7eOWyxrQ6bLMisYQ-1; Tue, 07 Mar 2023 02:10:11 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 09D8E101A521; Tue, 7 Mar 2023 07:10:11 +0000 (UTC) Received: from localhost.localdomain (ovpn-12-78.pek2.redhat.com [10.72.12.78]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0536B400F8FA; Tue, 7 Mar 2023 07:10:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678173012; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gjIx5SDMpja5GbvEXMQBJLPSstUi91acpPGFpSp1+NU=; b=D34KCnPt5gHEBdCZnQO/It06j+ySGdStVHCncVAIzUhsUekkxybs08y3ninrTWIpx4JauH 3FLQYWnS/DSvzGnIdoBNr58/S0aAKDObE2Ea4MFK4wTQhaSBBfR8kAgziMQ3ZAwVlsNLE4 OI0Aso4MjN1M7oNRdHqeGPpx5u59Uv4= X-MC-Unique: BgMJ6z7eOWyxrQ6bLMisYQ-1 From: Jason Wang To: qemu-devel@nongnu.org, peter.maydell@linaro.org Cc: Akihiko Odaki , Jason Wang Subject: [PULL 27/51] e1000e: Do not assert when MSI-X is disabled later Date: Tue, 7 Mar 2023 15:07:52 +0800 Message-Id: <20230307070816.34833-28-jasowang@redhat.com> In-Reply-To: <20230307070816.34833-1-jasowang@redhat.com> References: <20230307070816.34833-1-jasowang@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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=170.10.129.124; envelope-from=jasowang@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1678173330313100007 Content-Type: text/plain; charset="utf-8" From: Akihiko Odaki Assertions will fail if MSI-X gets disabled while a timer for MSI-X interrupts is running so remove them to avoid abortions. Fortunately, nothing bad happens even if the assertions won't trigger as msix_notify(), called by timer handlers, does nothing when MSI-X is disabled. This bug was found by Alexander Bulekov when fuzzing igb, a new device implementation derived from e1000e: https://patchew.org/QEMU/20230129053316.1071513-1-alxndr@bu.edu/ The fixed test case is: fuzz/crash_aea040166819193cf9fedb810c6d100221da721a Fixes: 6f3fbe4ed0 ("net: Introduce e1000e device emulation") Signed-off-by: Akihiko Odaki Signed-off-by: Jason Wang --- hw/net/e1000e_core.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c index ff93547..76c7814 100644 --- a/hw/net/e1000e_core.c +++ b/hw/net/e1000e_core.c @@ -162,8 +162,6 @@ e1000e_intrmgr_on_throttling_timer(void *opaque) { E1000IntrDelayTimer *timer =3D opaque; =20 - assert(!msix_enabled(timer->core->owner)); - timer->running =3D false; =20 if (msi_enabled(timer->core->owner)) { @@ -183,8 +181,6 @@ e1000e_intrmgr_on_msix_throttling_timer(void *opaque) E1000IntrDelayTimer *timer =3D opaque; int idx =3D timer - &timer->core->eitr[0]; =20 - assert(msix_enabled(timer->core->owner)); - timer->running =3D false; =20 trace_e1000e_irq_msix_notify_postponed_vec(idx); --=20 2.7.4