From nobody Sun May 19 19:40:24 2024 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 ARC-Seal: i=1; a=rsa-sha256; t=1714122140; cv=none; d=zohomail.com; s=zohoarc; b=ccYL6eTMQuWeEFTQuST86Fc7izEUzNAvVPhtEeAkVje+x6hUWvQa3+q4WZCOhRAhMNVI4a9PIvSPVxZlJR0K6qGXrHSQKHayQvAirsXad6BfNsEckh4uSBiu4AUi18NBWTYCeuErYk/VWPnAttAJ7KqX/IS1zTsLftt4/hN6P/Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1714122140; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=No65J7OaHylFCFp1ID5znDksi4BJaL2IkYdC72xkf0I=; b=l/ncJS2bFBYQyE13iQlSX+Oz9seQeiRAeSLtNB0jWm07mZ5jztshvbn5pSvW3Y5DgGURf4XfM7SGGSLQYQQXjC4PLDBDKbA1TW0tJazkWfwipAZoEEANVJ5oRHKtF8qcklgHWNfDuke/qBolQ3sKHWhu/XiVB177sgQidL3xWlM= 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1714122140143247.84562842499463; Fri, 26 Apr 2024 02:02:20 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s0HSl-000387-AI; Fri, 26 Apr 2024 05:01:48 -0400 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 1s0HSf-00036X-NF for qemu-devel@nongnu.org; Fri, 26 Apr 2024 05:01:42 -0400 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s0HSc-0000do-Sr for qemu-devel@nongnu.org; Fri, 26 Apr 2024 05:01:41 -0400 Received: by mail-pg1-x534.google.com with SMTP id 41be03b00d2f7-5c229dabbb6so1308515a12.0 for ; Fri, 26 Apr 2024 01:59:38 -0700 (PDT) Received: from localhost.localdomain.cc ([8.210.91.195]) by smtp.gmail.com with ESMTPSA id i13-20020a63e44d000000b005d8b89bbf20sm14038848pgk.63.2024.04.26.01.59.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 01:59:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smartx-com.20230601.gappssmtp.com; s=20230601; t=1714121977; x=1714726777; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=No65J7OaHylFCFp1ID5znDksi4BJaL2IkYdC72xkf0I=; b=fhq1BY0fC9s6nu6BkjcVMfShr/WIOXw5Ttjgzb1Xs/RpQd8lQIB61bsa0UlhW6in6w zEVlS+XQgUBZEI7pdrcz77tse50+4PFy5kLwWrvameKq5lnZO3fAe5+v15ilRrxhsYWl Jw3GKQ7AjhX9cM6FLq5YGWTi7xATpT5IpLq068dOrDlLzHKsCkkZoLL1xOkRtisG+9g6 spZ7NyZkkG3r+1GSwJeRFKr0vpW8rz3QJ1slksCnSMe+wwB5R0aVE7alPA011zr7Veda 4WiCxiPANakyMFpP6IvHofG4l13jafttWdL9R+XPpF5GdjcTTIXocASr6w1Yqxdka6I6 p5rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714121977; x=1714726777; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=No65J7OaHylFCFp1ID5znDksi4BJaL2IkYdC72xkf0I=; b=vbEOKDPN3sbI/WlPi5pW7BtBzCQQf6ik52ynLU0BNjD2JZ4i/Aw+I5eyuDyhI7+sQD GBgDyQsmw8W1pJiEtYwOA9ANe4k21l5zQwjNrhbD9gnSMO0IqNPfkLX8hE++9g/2jvsO zyGDkC5cmxlkcFr0YQdxWZPk0A4Np1HoLUfv9TiW78SBmxF0yizyebHZR4dYmiERcaJa j7grJvJns4rdyokUsqrON7mAzpXMXGNasn3mkAHkjP3RestsjWOa+9Dym8MZh/m68y3i x9CfeG4dbpITuH5Z7E2qv4NWAI8hVzp+GpvEcgz2oUE9dAipLRelWpc8X471gVjkxy2w YkvA== X-Forwarded-Encrypted: i=1; AJvYcCXYpalHiLELzyB4fGBLhkwMPnrW5sP560xzKQPa+l3Jfpx2u2yKGHuGgyyVBQSPkmS8BXu5uXlpEh2IG4u4StREoz/RRg8= X-Gm-Message-State: AOJu0Yzt6P4sWN3SluKaM+imQNV7oiK2fV9em5Lb3u5NvWngrVA+UmDr ej4Q0XhoywaoTgxfa1SjesP1hQQKiUlau63rsi/ZU1ckerxGI2ZFYGSvhyhuo1w= X-Google-Smtp-Source: AGHT+IE3c1/qWY+RD01c/u37zBI9iHSicIpGyX9aPCIj6zCNVMqsyO9IZF+eHSNt11rAdgrAwHX2/g== X-Received: by 2002:a05:6a20:431e:b0:1ac:3b5d:a3f4 with SMTP id h30-20020a056a20431e00b001ac3b5da3f4mr2705703pzk.3.1714121977236; Fri, 26 Apr 2024 01:59:37 -0700 (PDT) From: Li Feng To: Raphael Norwitz , "Michael S. Tsirkin" , Kevin Wolf , Hanna Reitz , Paolo Bonzini , Fam Zheng , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-block@nongnu.org (open list:Block layer core), qemu-devel@nongnu.org (open list:All patches CC here) Cc: Yajun Wu , Stefano Garzarella , Li Feng Subject: [PATCH 1/2] Revert "vhost-user: fix lost reconnect" Date: Fri, 26 Apr 2024 16:58:38 +0800 Message-ID: <20240426085855.665813-2-fengli@smartx.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240426085855.665813-1-fengli@smartx.com> References: <20240426085855.665813-1-fengli@smartx.com> MIME-Version: 1.0 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: none client-ip=2607:f8b0:4864:20::534; envelope-from=fengli@smartx.com; helo=mail-pg1-x534.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=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 @smartx-com.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1714122142281100009 Content-Type: text/plain; charset="utf-8" This reverts commit f02a4b8e6431598612466f76aac64ab492849abf. Signed-off-by: Li Feng --- hw/block/vhost-user-blk.c | 2 +- hw/scsi/vhost-user-scsi.c | 3 +-- hw/virtio/vhost-user-base.c | 2 +- hw/virtio/vhost-user.c | 10 ++-------- include/hw/virtio/vhost-user.h | 3 +-- 5 files changed, 6 insertions(+), 14 deletions(-) diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c index 9e6bbc6950..41d1ac3a5a 100644 --- a/hw/block/vhost-user-blk.c +++ b/hw/block/vhost-user-blk.c @@ -384,7 +384,7 @@ static void vhost_user_blk_event(void *opaque, QEMUChrE= vent event) case CHR_EVENT_CLOSED: /* defer close until later to avoid circular close */ vhost_user_async_close(dev, &s->chardev, &s->dev, - vhost_user_blk_disconnect, vhost_user_blk_e= vent); + vhost_user_blk_disconnect); break; case CHR_EVENT_BREAK: case CHR_EVENT_MUX_IN: diff --git a/hw/scsi/vhost-user-scsi.c b/hw/scsi/vhost-user-scsi.c index a63b1f4948..48a59e020e 100644 --- a/hw/scsi/vhost-user-scsi.c +++ b/hw/scsi/vhost-user-scsi.c @@ -214,8 +214,7 @@ static void vhost_user_scsi_event(void *opaque, QEMUChr= Event event) case CHR_EVENT_CLOSED: /* defer close until later to avoid circular close */ vhost_user_async_close(dev, &vs->conf.chardev, &vsc->dev, - vhost_user_scsi_disconnect, - vhost_user_scsi_event); + vhost_user_scsi_disconnect); break; case CHR_EVENT_BREAK: case CHR_EVENT_MUX_IN: diff --git a/hw/virtio/vhost-user-base.c b/hw/virtio/vhost-user-base.c index a83167191e..4b54255682 100644 --- a/hw/virtio/vhost-user-base.c +++ b/hw/virtio/vhost-user-base.c @@ -254,7 +254,7 @@ static void vub_event(void *opaque, QEMUChrEvent event) case CHR_EVENT_CLOSED: /* defer close until later to avoid circular close */ vhost_user_async_close(dev, &vub->chardev, &vub->vhost_dev, - vub_disconnect, vub_event); + vub_disconnect); break; case CHR_EVENT_BREAK: case CHR_EVENT_MUX_IN: diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index cdf9af4a4b..c929097e87 100644 --- a/hw/virtio/vhost-user.c +++ b/hw/virtio/vhost-user.c @@ -2776,7 +2776,6 @@ typedef struct { DeviceState *dev; CharBackend *cd; struct vhost_dev *vhost; - IOEventHandler *event_cb; } VhostAsyncCallback; =20 static void vhost_user_async_close_bh(void *opaque) @@ -2791,10 +2790,7 @@ static void vhost_user_async_close_bh(void *opaque) */ if (vhost->vdev) { data->cb(data->dev); - } else if (data->event_cb) { - qemu_chr_fe_set_handlers(data->cd, NULL, NULL, data->event_cb, - NULL, data->dev, NULL, true); - } + } =20 g_free(data); } @@ -2806,8 +2802,7 @@ static void vhost_user_async_close_bh(void *opaque) */ void vhost_user_async_close(DeviceState *d, CharBackend *chardev, struct vhost_dev *vhost, - vu_async_close_fn cb, - IOEventHandler *event_cb) + vu_async_close_fn cb) { if (!runstate_check(RUN_STATE_SHUTDOWN)) { /* @@ -2823,7 +2818,6 @@ void vhost_user_async_close(DeviceState *d, data->dev =3D d; data->cd =3D chardev; data->vhost =3D vhost; - data->event_cb =3D event_cb; =20 /* Disable any further notifications on the chardev */ qemu_chr_fe_set_handlers(chardev, diff --git a/include/hw/virtio/vhost-user.h b/include/hw/virtio/vhost-user.h index d7c09ffd34..324cd8663a 100644 --- a/include/hw/virtio/vhost-user.h +++ b/include/hw/virtio/vhost-user.h @@ -108,7 +108,6 @@ typedef void (*vu_async_close_fn)(DeviceState *cb); =20 void vhost_user_async_close(DeviceState *d, CharBackend *chardev, struct vhost_dev *vhost, - vu_async_close_fn cb, - IOEventHandler *event_cb); + vu_async_close_fn cb); =20 #endif --=20 2.44.0 From nobody Sun May 19 19:40:24 2024 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 ARC-Seal: i=1; a=rsa-sha256; t=1714122140; cv=none; d=zohomail.com; s=zohoarc; b=h44hUKougK16ZimCSBferZj4DHcui7pvB0RPuLdRGTEuip8K+C5fIEYiV9DFW1r33Xr9F51iI/NaN62L8I7BgNEV298+OaKqNMczhywk+e185JBFmFjVaTrf1SglDTGdHsZC4Qo6bmv1a8Yo9hBrDKXAsM4cft6M5cbvo4YiMtg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1714122140; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=huc445Z8xFVx73tKKS30aR+cLtLJnKrTI8Kz4PO8eik=; b=dUm7aTeDHNbHm65GiDxHyF18n+m3/MMZo6yPc9ZvIKZoJcZ2sRDOgLsJi/lEucpeNX/TRhozk8ecqullcpH7HPo8Fbq5XekfM+5tYFjKl/to49K6iHZyMsnvbV5PjU1KIDIPBJyrKToqd5mae85U6g7cop0cwCDjpJ/57sbFQcw= 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1714122140214273.8938609715166; Fri, 26 Apr 2024 02:02:20 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s0HSp-00038n-An; Fri, 26 Apr 2024 05:01:51 -0400 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 1s0HSh-00036s-GC for qemu-devel@nongnu.org; Fri, 26 Apr 2024 05:01:44 -0400 Received: from mail-ot1-x32d.google.com ([2607:f8b0:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s0HSe-0000dw-KJ for qemu-devel@nongnu.org; Fri, 26 Apr 2024 05:01:41 -0400 Received: by mail-ot1-x32d.google.com with SMTP id 46e09a7af769-6eb6b9e1808so1187649a34.3 for ; Fri, 26 Apr 2024 01:59:40 -0700 (PDT) Received: from localhost.localdomain.cc ([8.210.91.195]) by smtp.gmail.com with ESMTPSA id i13-20020a63e44d000000b005d8b89bbf20sm14038848pgk.63.2024.04.26.01.59.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 01:59:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smartx-com.20230601.gappssmtp.com; s=20230601; t=1714121979; x=1714726779; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=huc445Z8xFVx73tKKS30aR+cLtLJnKrTI8Kz4PO8eik=; b=3gDDx+TljbEytWvgC+zBRCWJ81CDwzA1lPP06d6eJgFKARvjftS+ZtHrRYJePyvSU1 M3k5INu7PUDytfnB8dexe9VGl1pTMlYiyEmrwGKGbCpNxfM1Ug49o6jSFT7HP9EnawId FA9g9FCReEACtbH+rTkGGUdoKze2BqZuBEDGholr0ogKqwZRzfp7gfxH+LqDUvNC98CV Feq7uFtT1TtLn+RBqCEeIM1YREwzsWrkrwlYo1/SOuuTKmQiH06L1WZdZamD1UL09sV3 3XmOZk69OznrsSDYsTyfaYeUrmK+OfVeE3ttTRQYm2q2yz3d0rYB7XwdZZhXSv3Vxt4P q2Cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714121979; x=1714726779; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=huc445Z8xFVx73tKKS30aR+cLtLJnKrTI8Kz4PO8eik=; b=T6xUEUkFMc3vQDb0M2tjoqmiRAZ8thJV+Ta1IiaB0ePEGreKTmJgALM9VNh7ufk9bQ HC1eV+rmsLTZM0OSqX29U+9CpIjLh5BEE0an9dDrjnKYkwLTcvzRnpD9rgRgfY0Tc9NA YHbXPqN3G7ZyeAg9QjBTlSYts/g9iDgmewFk5Pysi9UA/aZAWBfpAY4NuMS27TjYMEkk HQbhfiBic4EP8E+usaQvuBYQ8JdeocOa4n6bdAkxE3w/gzAqUuhCI7GU8WD1LYczS3jo w3PP8usmogBRy6aZHk6fyNIO0tnEGnR65QBaqS4HcNjo6YE7+bt+b35xFr/zyNXpfpHC Aqzw== X-Forwarded-Encrypted: i=1; AJvYcCX6D1utA4btZFmb9TFKWCRIkeBn6fPk2CClskwhRiV7Ohljm1a5Ae9QPFKIH2q2/nmbEADPvxa6ao1gRvxM7jgGPXd/vI4= X-Gm-Message-State: AOJu0YwvUcMo6KHBlDPUtalIQdNA8hfvZkgjFP7QIYvvQGw2Y3yKReWn 6zKzfs3mdGl81U0JBDPX4vOOUtgddd4NKA0b/j6bbl7AllpdzUv6d71YessZW4o= X-Google-Smtp-Source: AGHT+IHFn+ruOtnxMrnvnF4H/zMbW2lbC5Uh1eCJCY3g68x8fUfd9wVMQYpMzLPIxQ3CJwaK7Kg6hA== X-Received: by 2002:a9d:5f1a:0:b0:6ed:d1a8:11cb with SMTP id f26-20020a9d5f1a000000b006edd1a811cbmr1029386oti.28.1714121979161; Fri, 26 Apr 2024 01:59:39 -0700 (PDT) From: Li Feng To: "Michael S. Tsirkin" , qemu-devel@nongnu.org (open list:All patches CC here) Cc: Yajun Wu , Stefano Garzarella , Li Feng Subject: [PATCH 2/2] vhost-user: fix lost reconnect again Date: Fri, 26 Apr 2024 16:58:39 +0800 Message-ID: <20240426085855.665813-3-fengli@smartx.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240426085855.665813-1-fengli@smartx.com> References: <20240426085855.665813-1-fengli@smartx.com> MIME-Version: 1.0 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: none client-ip=2607:f8b0:4864:20::32d; envelope-from=fengli@smartx.com; helo=mail-ot1-x32d.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=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 @smartx-com.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1714122142244100007 Content-Type: text/plain; charset="utf-8" When the vhost-user is reconnecting to the backend, and if the vhost-user f= ails at the get_features in vhost_dev_init(), then the reconnect will fail and it will not be retriggered forever. The reason is: When the vhost-user fail at get_features, the vhost_dev_cleanup will be cal= led immediately. vhost_dev_cleanup calls 'memset(hdev, 0, sizeof(struct vhost_dev))'. The reconnect path is: vhost_user_blk_event vhost_user_async_close(.. vhost_user_blk_disconnect ..) qemu_chr_fe_set_handlers <----- clear the notifier callback schedule vhost_user_async_close_bh The vhost->vdev is null, so the vhost_user_blk_disconnect will not be called, then the event fd callback will not be reinstalled. With this patch, the vhost_user_blk_disconnect will call the vhost_dev_cleanup() again, it's safe. All vhost-user devices have this issue, including vhost-user-blk/scsi. Fixes: 71e076a07d ("hw/virtio: generalise CHR_EVENT_CLOSED handling") Signed-off-by: Li Feng --- hw/virtio/vhost-user.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index c929097e87..c407ea8939 100644 --- a/hw/virtio/vhost-user.c +++ b/hw/virtio/vhost-user.c @@ -2781,16 +2781,8 @@ typedef struct { static void vhost_user_async_close_bh(void *opaque) { VhostAsyncCallback *data =3D opaque; - struct vhost_dev *vhost =3D data->vhost; =20 - /* - * If the vhost_dev has been cleared in the meantime there is - * nothing left to do as some other path has completed the - * cleanup. - */ - if (vhost->vdev) { - data->cb(data->dev); - } + data->cb(data->dev); =20 g_free(data); } --=20 2.44.0