Received: by 2002:a05:7412:d008:b0:f9:6acb:47ec with SMTP id bd8csp333517rdb; Tue, 19 Dec 2023 20:02:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IFwupd+RtPtiWdAr+Hk0hogBV01hrL4k4tvGVRz7puWhSqiUXhFzjTIw0/NZRxMR3U+PvKr X-Received: by 2002:a0c:fbcb:0:b0:67a:d9d6:472c with SMTP id n11-20020a0cfbcb000000b0067ad9d6472cmr20946598qvp.44.1703044944413; Tue, 19 Dec 2023 20:02:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703044944; cv=none; d=google.com; s=arc-20160816; b=abS+WPr2g8Rl7v9ewPe3pO2z1iC98bWDcR2o2kqkXadEiW2QVSUYCXQaTY/kv34I9M FU3epDP2nIhrXziUA4u3h6iBB+pWQdEpZx1l5LpsAt/xHTvJZfEwnWdYf1EA0SGXxV4K h2AIniH34fSXJmYNe0L9HkRllYUxn74XRFPbTM8486LoronaFC6/j0XVniRDYtW0M9ms 0+RDSGi+ql1PZ8bVNzqL9iE1e6GXdZ+Q4PFNzE3LLWbZDTCM6XQp079mBEVFWDjSDaOa paCXKtPzdcatkkpq96/qkTXnuLCivSLPd61skwzQnOVuQdXVRl/dNWjqy8RSxZ/uPdmL lYfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=Y9WrZt2uNhtNYFIXv3cFXVd3+GtJdXG5iynZg0EOskg=; fh=BYkIUKLlQGUytg7pq5/GnVzvmWbp6gNZ2/MioN0TtEI=; b=jlU0vc5emIG5pOZzhEh13QAj87jSIUk8ILygFWgghv1eNjFlo6VQ5p3HGCgs4AB78p sf2hePBZIXsLagu+MLSCRMFsPdUddgSmli4GC9pH+zeF6qswDnR8sgeZJgIX0xow/PZt hs9o9l3WMjzmazxeDqOWGzZmCORGRUE6H/Wd5xEFeUcDsFVEHxBMTuj1vsWyyNi/mXmH LWmF9Ksd10lO9EYF+RvSd/8/IV1vYIHoAxctfiKNUZRe/afjEwT8ECXhPfDLxEsatiPI 0bLGXYtfmjw84w7c25+xW9UF1ByNcWCfS32PeNmvTA8v/thCFQB4e6h1VDKlrMk4ujSS Q6iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ID58M14q; spf=pass (google.com: domain of linux-kernel+bounces-6346-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6346-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id r27-20020a0cb29b000000b0067aa6f73d6asi14377385qve.303.2023.12.19.20.02.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 20:02:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-6346-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ID58M14q; spf=pass (google.com: domain of linux-kernel+bounces-6346-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6346-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 19CCB1C25144 for ; Wed, 20 Dec 2023 04:02:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 965DFC128; Wed, 20 Dec 2023 04:01:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ID58M14q" X-Original-To: linux-kernel@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7CFCC1BDF7 for ; Wed, 20 Dec 2023 04:01:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1703044882; 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=Y9WrZt2uNhtNYFIXv3cFXVd3+GtJdXG5iynZg0EOskg=; b=ID58M14qelHWpdQW6xLtFbgAfWg7SNb176SsevazIDt6Eo/idxZlJD4A2jACPQZm5xjh7r wYGuBabzmmCl7jm+0d13O4IoMzf0NPA16urVX7b8kcfWCYDC6FBMM/eH1K2LVPiB4zY6kE OjZ0xILo30blag4VkVyuJEcgZTkfKdc= Received: from mail-ot1-f70.google.com (mail-ot1-f70.google.com [209.85.210.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-494-18CZG1jGPSSSFt7QqQ9SKQ-1; Tue, 19 Dec 2023 23:01:20 -0500 X-MC-Unique: 18CZG1jGPSSSFt7QqQ9SKQ-1 Received: by mail-ot1-f70.google.com with SMTP id 46e09a7af769-6da66541ac5so3442690a34.0 for ; Tue, 19 Dec 2023 20:01:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703044880; x=1703649680; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Y9WrZt2uNhtNYFIXv3cFXVd3+GtJdXG5iynZg0EOskg=; b=Yg2W2gmIjy74hl4HpFCBlzWS/1QZG8VeMFvPS9xAcJA+1P3U2+VyvRE3WBbll1R05O 5oZLB93tY/ERD7mYUIMLKzoOP0GSn4BK6AvFLElPIVs4UlNCoQsolRoo2S9fcJDd9rzy xMbcZ1wzUZzqGiBCvcehNa9488BrPmsl9dlV8/5FaPVBR8Wor4lfIEGEaRXdvsWVviEG deELQ330kf1dtrysm3tKnyoJYtMA2iehIbwSrVrrf5NIzAHAaOkq3UPRQu9RhXzjjmMY +6BUysANFEacynXSo/BeLyusA/ruhojJX7pEQJEqdOG4+u+6POz3IDElCm7BzfHM6yaW e9rg== X-Gm-Message-State: AOJu0YyPz4tDPBSrTjcptYMjctiBY9sf4tbw3aw/YyLmvhql2lZlCnA6 QSFLK3bxW7bZL3sO/wyGwu0R7DZefztymaUksAjkJa5duWMW0my0Wkqsl6BYl19EcjYzy2pCaNq SykL/0efWTdlFWF3DcRTZfeDzw3yKP04ArY0wOfox X-Received: by 2002:a05:6830:111a:b0:6db:a784:e63c with SMTP id w26-20020a056830111a00b006dba784e63cmr1226581otq.52.1703044880074; Tue, 19 Dec 2023 20:01:20 -0800 (PST) X-Received: by 2002:a05:6830:111a:b0:6db:a784:e63c with SMTP id w26-20020a056830111a00b006dba784e63cmr1226573otq.52.1703044879855; Tue, 19 Dec 2023 20:01:19 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <72a89724-9dad-499a-a0ed-ad9d046d235d@wanadoo.fr> In-Reply-To: <72a89724-9dad-499a-a0ed-ad9d046d235d@wanadoo.fr> From: Jason Wang Date: Wed, 20 Dec 2023 12:01:08 +0800 Message-ID: Subject: Re: [PATCH] vdpa: Fix an error handling path in eni_vdpa_probe() To: Christophe JAILLET Cc: "Michael S. Tsirkin" , Wu Zongyong , Arnd Bergmann , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, virtualization@lists.linux-foundation.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Dec 8, 2023 at 5:14=E2=80=AFAM Christophe JAILLET wrote: > > Le 20/10/2022 =C3=A0 21:21, Christophe JAILLET a =C3=A9crit : > > After a successful vp_legacy_probe() call, vp_legacy_remove() should be > > called in the error handling path, as already done in the remove functi= on. > > > > Add the missing call. > > > > Fixes: e85087beedca ("eni_vdpa: add vDPA driver for Alibaba ENI") > > Signed-off-by: Christophe JAILLET > > --- > > drivers/vdpa/alibaba/eni_vdpa.c | 6 ++++-- > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/vdpa/alibaba/eni_vdpa.c b/drivers/vdpa/alibaba/eni= _vdpa.c > > index 5a09a09cca70..cce3d1837104 100644 > > --- a/drivers/vdpa/alibaba/eni_vdpa.c > > +++ b/drivers/vdpa/alibaba/eni_vdpa.c > > @@ -497,7 +497,7 @@ static int eni_vdpa_probe(struct pci_dev *pdev, con= st struct pci_device_id *id) > > if (!eni_vdpa->vring) { > > ret =3D -ENOMEM; > > ENI_ERR(pdev, "failed to allocate virtqueues\n"); > > - goto err; > > + goto err_remove_vp_legacy; > > } > > > > for (i =3D 0; i < eni_vdpa->queues; i++) { > > @@ -509,11 +509,13 @@ static int eni_vdpa_probe(struct pci_dev *pdev, c= onst struct pci_device_id *id) > > ret =3D vdpa_register_device(&eni_vdpa->vdpa, eni_vdpa->queues); > > if (ret) { > > ENI_ERR(pdev, "failed to register to vdpa bus\n"); > > - goto err; > > + goto err_remove_vp_legacy; > > } > > > > return 0; > > > > +err_remove_vp_legacy: > > + vp_legacy_remove(&eni_vdpa->ldev); > > err: > > put_device(&eni_vdpa->vdpa.dev); > > return ret; > > Polite reminder on a (very) old patch. Acked-by: Jason Wang Thanks > > CJ >