Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 090EFC4332F for ; Thu, 22 Dec 2022 06:04:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 9C9B081EE8; Thu, 22 Dec 2022 06:04:57 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 9C9B081EE8 Authentication-Results: smtp1.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=R62w4Img X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QDgQlZwjVNtr; Thu, 22 Dec 2022 06:04:56 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp1.osuosl.org (Postfix) with ESMTPS id 39A0981270; Thu, 22 Dec 2022 06:04:56 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 39A0981270 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 16043C0071; Thu, 22 Dec 2022 06:04:56 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 72260C0070 for ; Thu, 22 Dec 2022 06:04:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 4E49A40153 for ; Thu, 22 Dec 2022 06:04:54 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 4E49A40153 Authentication-Results: smtp2.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=R62w4Img X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OHfJvzAgw_yd for ; Thu, 22 Dec 2022 06:04:53 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org A3788403BE Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id A3788403BE for ; Thu, 22 Dec 2022 06:04:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1671689092; 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=1rTeZDLahEEUIQy4wMRthdfJbzV+lOwcoNI4SggfJI8=; b=R62w4ImgynvjYrO7IgrIDcR2VDtZpEl+S4+8iqDsFZkGlcVbBS7eMDSJGc6NS3QAVxjW6+ DPXzl5TiHAd6nmPvsm0E29IkXV1mRJkfx8jqT2nSB1lfW3vcSz042Kes0u94WxrmrO/Y2M vZsaudRsAAVF4kofjO1/fGuFdUFJ+UI= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-152-V2twCnI5NIurCMkSOvZAzQ-1; Thu, 22 Dec 2022 01:04:49 -0500 X-MC-Unique: V2twCnI5NIurCMkSOvZAzQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DB30A29ABA2B; Thu, 22 Dec 2022 06:04:48 +0000 (UTC) Received: from localhost.localdomain (ovpn-13-179.pek2.redhat.com [10.72.13.179]) by smtp.corp.redhat.com (Postfix) with ESMTP id 48B21112132C; Thu, 22 Dec 2022 06:04:43 +0000 (UTC) From: Jason Wang To: mst@redhat.com, jasowang@redhat.com Subject: [RFC PATCH 2/4] virtio_ring: switch to use BAD_RING() Date: Thu, 22 Dec 2022 14:04:25 +0800 Message-Id: <20221222060427.21626-3-jasowang@redhat.com> In-Reply-To: <20221222060427.21626-1-jasowang@redhat.com> References: <20221222060427.21626-1-jasowang@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, eperezma@redhat.com, edumazet@google.com, maxime.coquelin@redhat.com, kuba@kernel.org, pabeni@redhat.com, davem@davemloft.net X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" Switch to reuse BAD_RING() to allow common logic to be implemented in BAD_RING(). Signed-off-by: Jason Wang --- drivers/virtio/virtio_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 2e7689bb933b..90c2034a77f3 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -2237,7 +2237,7 @@ bool virtqueue_notify(struct virtqueue *_vq) /* Prod other side to tell it about changes. */ if (!vq->notify(_vq)) { - vq->broken = true; + BAD_RING(vq, "vq %d is broken\n", vq->vq.index); return false; } return true; -- 2.25.1 _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization