From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D0BF3C433DB for ; Wed, 24 Feb 2021 17:49:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7918964EDD for ; Wed, 24 Feb 2021 17:49:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236006AbhBXRso (ORCPT ); Wed, 24 Feb 2021 12:48:44 -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