Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp597439pxb; Wed, 24 Feb 2021 09:51:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJw+1yuMgKY/FjJ4vhbJY01NFYRgTgi7fnJYP6W6KNfYK3CBbopYOr0SVoqra7kRGVDi+hwW X-Received: by 2002:a17:906:19c9:: with SMTP id h9mr7020044ejd.288.1614189102954; Wed, 24 Feb 2021 09:51:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614189102; cv=none; d=google.com; s=arc-20160816; b=WmmUFunUNF41AnwroBONhGAWHYKHQ+swq8+EfV3VofCIPynraAf/6acAYXeD3w47iw edPTlolchf+4gD+fYAWjySbqyHflbffDorS8n8QNOP9dIxLVF+E9dOuhSREqPEBBVV4K zt4z12mYzLi0sk54VOOl5skRa9H7sAC3MhBbtJIBVjvhRWLHmnnUqmAF4xSE0KiUT1bb 5xsh6t4jVVpI4CHPZCC+nZHk9paII2EN/FsZrbtM8xDD9YAyb5L/egOWZuYvkNEJyJUj vki585C1dmy8S7hZbAe7gGPZCrT8nZBARthcs0UwWw/cJHNOtOrdHet/vsv0zNJf4JuY 99tA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=9vMc5IDtWIWHzA5qb6nps20KNvfTWHSoLjMmqyQPdcE=; b=1C7QRaJDY89DWmhx2/GpHFFYifR/p3fk9BQQ2bVLAIwQ8xsrGgd0bLjOm5CGsOytg5 DaR1KTZxpgZ1W7qdBOm2hoED9AkqMdmuDFhtEeE3mE2Wwf8Qh9ySUQn9t88YWjApMOQM XOe+SBoTe8ZULN4lsACNGIZGmFlTs34vYFEA93uZQ+go4fuZJhF2gT7Gq3aJ/5eiNF28 7BiZaRhC8nYInJd1zgfPFjyfvBWSZhYVBHnM2aasq+dG5R3s55TX7w3LOZHGq/F5EbhU wS2wjcuD/p6EJCuzDZRI8cO7e9AZq9za21i9qGFPR3RldE7ALFX6sURa5BvP3CCarFEQ JoUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=dNcY+iah; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ju13si1663122ejb.263.2021.02.24.09.51.13; Wed, 24 Feb 2021 09:51:42 -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=@amazon.com header.s=amazon201209 header.b=dNcY+iah; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233288AbhBXRsm (ORCPT + 99 others); Wed, 24 Feb 2021 12:48:42 -0500 Received: from smtp-fw-4101.amazon.com ([72.21.198.25]:59955 "EHLO smtp-fw-4101.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234789AbhBXRsk (ORCPT ); Wed, 24 Feb 2021 12:48:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1614188919; x=1645724919; h=from:to:cc:subject:date:message-id:in-reply-to: mime-version; bh=9vMc5IDtWIWHzA5qb6nps20KNvfTWHSoLjMmqyQPdcE=; b=dNcY+iahmNNJqSRSzHp/TufCYAFF0lUliLfUJQIY21AXSqc6JxVW2nhz bEhLKedVlyjKbt4fBNVnqp0PP6aWgf2mUyEcPRVOatc6Yr6vIRblnprU6 KqN2mzRbWvW8C/477Lk4FUwcwNreICQIdKfUxDFGfliJesPsNQQH0Ojv/ o=; X-IronPort-AV: E=Sophos;i="5.81,203,1610409600"; d="scan'208";a="87725213" Received: from iad12-co-svc-p1-lb1-vlan2.amazon.com (HELO email-inbound-relay-1d-5dd976cd.us-east-1.amazon.com) ([10.43.8.2]) by smtp-border-fw-out-4101.iad4.amazon.com with ESMTP; 24 Feb 2021 17:47:52 +0000 Received: from EX13D31EUA001.ant.amazon.com (iad12-ws-svc-p26-lb9-vlan3.iad.amazon.com [10.40.163.38]) by email-inbound-relay-1d-5dd976cd.us-east-1.amazon.com (Postfix) with ESMTPS id 6FE2FA1B7C; Wed, 24 Feb 2021 17:47:50 +0000 (UTC) Received: from u3f2cd687b01c55.ant.amazon.com (10.43.160.207) by EX13D31EUA001.ant.amazon.com (10.43.165.15) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 24 Feb 2021 17:47:45 +0000 From: SeongJae Park To: Greg KH CC: SeongJae Park , , , , , "# 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 Date: Wed, 24 Feb 2021 18:47:32 +0100 Message-ID: <20210224174732.30014-1-sjpark@amazon.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.43.160.207] X-ClientProxiedBy: EX13D41UWB002.ant.amazon.com (10.43.161.109) To EX13D31EUA001.ant.amazon.com (10.43.165.15) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 24 Feb 2021 18:21:09 +0100 Greg KH wrote: > 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. I tested the commit is cleanly applicable with 'git cherry-pick' before posting this. I just tried 'git format-patch ... && git am ...' and confirmed it doesn't work. Sorry, my fault. > > > Tested-by: Markus Boehme > > What was tested? We confirmed the unmodified v4.4.y kernel crashes on a stress test that repeatedly doing netdev attach/detach, while the patch applied version doesn't. > > I backported the patch, but next time, please provide the patch that > will work properly. Thanks, and apology for the inconvenience. I will do the check with posting patch again rather than only 'git cherry-pick' from next time. Thanks, SeongJae Park > > greg k-h