Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp579187pxb; Wed, 24 Feb 2021 09:25:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJwkK/QNQ44Olcq2z/uhsxM/GS0CPCIHoyYJqba3ksmoDIGICO5imIKU1ozpSvsLRpQtjr2e X-Received: by 2002:a17:906:bc84:: with SMTP id lv4mr32787221ejb.136.1614187536296; Wed, 24 Feb 2021 09:25:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614187536; cv=none; d=google.com; s=arc-20160816; b=zzHL4O5yt0d4z/Xts6ttZQP56YJaBoD9gEuvXurmSYd6ICtNtIw29sjosnbUEs5z5m S13F2+XGWGgeGeV73yoF9oUeUGovERanVA+5cmRVYOEEY9xYExrW5yEJmUCb/pjuSpCr 1WcTlHHweEWqfdyDQiZ/IdubeHAeZxr3czsoET2ZqkvPQRgc1ut3I0wskVHKOVVKGx57 sdkPXtI+8v4gWV6/IbkeqTce4PH6zYmBEsNj00pNm38S8M6nve0q51Qc4zILEqVJ3cuC uosPL7yyg/2RfCrYhNKPZJY+PRiEY4kE7nO9MNI7EtgOMYBKST8yKuHlwMepJDlTjxRy Nsug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=kq+MV/p7wzBVMcpVcY7t6faVnBGsqae9E7K8Mh3BtVI=; b=SOm9/P4w8NLzB3oIWPrD2a6o6YVDvXw0DFFc3exLZ9ylXB64U2X/tIvgd9fayH/z7P eSMWgFm8rGxchlVLqIsrHO58ge8YO7sYXx+e99f1HQ98Ju/5bv7u7Zqy9WFgNFbmDSOB pUHyzODexPJjJcaiLRsbPJRIw6Q5isDAsfYuZMIJ1W9nxuzNONNcbLKt6ic89rKiroub n8pbBpLrpAUHZ6FtqikiFYEks0vCq4TEUg/ryq3ndV2zPv2lWQ9LFwb2f+m+zS853AW8 Dj+CZPNVDRO2FLiWZYdQjQiqx6HFsABXGRJ7kyo/3aZrtKfBMmPsG1l+vqF8R4JDRA4c +n2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zlwI5GC2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m16si1462219edd.406.2021.02.24.09.25.12; Wed, 24 Feb 2021 09:25:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zlwI5GC2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234783AbhBXRV6 (ORCPT + 99 others); Wed, 24 Feb 2021 12:21:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:50802 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234704AbhBXRVy (ORCPT ); Wed, 24 Feb 2021 12:21:54 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5374964F0B; Wed, 24 Feb 2021 17:21:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614187273; bh=NXWjf57sYNaJSH0gZdTTslFvP5uVci8Rc5jXJAkjRs4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=zlwI5GC2fLOTHSSRoe1bJsYgI8Q9JzQkdp8/5xcXYGhpoS3b9pz5TGeTixj2eDkJD V897p0S4FZir+EX0eh3FzZmWFVTFh1dV840l96hCsItJd7rmBr6GaFlPnF5zLq+qWe +UnR1+rMXNsObsDavJAnb6Oc3+FFXxE42sh0pMzU= Date: Wed, 24 Feb 2021 18:21:09 +0100 From: Greg KH To: SeongJae Park Cc: sashal@kernel.org, aams@amazon.com, markubo@amazon.com, linux-kernel@vger.kernel.org, "# 4 . 4 . y" , David Vrabel , "David S . Miller" Subject: Re: Please apply "xen-netback: delete NAPI instance when queue fails to initialize" to v4.4.y Message-ID: References: <20210224170356.20697-1-sjpark@amazon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210224170356.20697-1-sjpark@amazon.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 24, 2021 at 06:03:56PM +0100, SeongJae Park wrote: > This is a request for merge of upstream commit 4a658527271b ("xen-netback: > delete NAPI instance when queue fails to initialize") on v4.4.y tree. > > If 'xenvif_connect()' fails after successful 'netif_napi_add()', the napi is > not cleaned up. Because 'create_queues()' frees the queues in its error > handling code, if the 'xenvif_free()' is called for the vif, use-after-free > occurs. The upstream commit fixes the problem by cleaning up the napi in the > 'xenvif_connect()'. > > Attaching the original patch below for your convenience. The original patch does not apply cleanly. > Tested-by: Markus Boehme What was tested? I backported the patch, but next time, please provide the patch that will work properly. greg k-h