Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp3182937pxb; Mon, 18 Apr 2022 18:21:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwsW+HIhYccM7CMoUCG5kntIzoHZ4R9Qsy5GBKpR04jkckPrD2DZ1lZMYaE/oiMLPz1eCku X-Received: by 2002:a17:90b:224a:b0:1cb:8bad:ec3e with SMTP id hk10-20020a17090b224a00b001cb8badec3emr15962278pjb.30.1650331303852; Mon, 18 Apr 2022 18:21:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650331303; cv=none; d=google.com; s=arc-20160816; b=RdaERYTufY5ItgijUVtf7En1GOfyG/nPgEEdwAK2PobBr1GMBj+E8UZEDynnCqI1A0 AnXwlyfI8J9vvH+tww8zrqsA8chy0mTQuvT4hNfQHmgmwRUFseEoVjeIDduHrgI9OayA e0UZGNpFL9Y6Ab3dLPPHtt99vQN6btnyITOHruZkNDMKUqu140yGaa6umGxytlR0MTyy RkEfHCl/vGxbCE3EHwKgB5ZEerBCHOczW23IVnP9S6VtAyHnsWM16vhWkvNhdmZw5iXV OPAxaxMhuyj3pKgN4EzpV3dxZAdIBULi9LLDEQp2VulT4kV8AdXoOgVZSS1/e3AahQWr 5hFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=VnW4FhvpnhWi4GuLKg+lBAOg9DDdEut9OWMOWMFhUg0=; b=sgwWZ8A3gLWd4F8C3gfJlPJAR65YepznZblLd4WAU6obDoizb41xBiQulgARc/OBwW 8fYEMokQpfim8ueJ8kvToNzJ0rYwpG7AGlKNbEUwsy3/zad+TKW78i3z2I8IyTM+jczN q4MxJ2AZB7PiQxUOHpXJFNTkeafJYnrJ0ZlgVL//n3lOG+8aOvBdat9R+b/IxT3zbWC6 OPtu7KvVEAsIMOqMLkiaw6oRf3F9BPryd2WRbuJDWEQ7RdWjglxc3a055tAYwprByHi8 g94/OOYRffAIWfIgk1bAbuTXp+q0+B+oY4aydzPYIVVf31sx0lV/j0dQOryiVw8hlQns QrpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ndjk5KfH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e24-20020a635018000000b0039cef730af0si9756925pgb.608.2022.04.18.18.21.27; Mon, 18 Apr 2022 18:21:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ndjk5KfH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231248AbiDRMZA (ORCPT + 99 others); Mon, 18 Apr 2022 08:25:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238970AbiDRMXP (ORCPT ); Mon, 18 Apr 2022 08:23:15 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A504D1FA4C; Mon, 18 Apr 2022 05:18:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4371460F0C; Mon, 18 Apr 2022 12:18:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3583DC385A1; Mon, 18 Apr 2022 12:18:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650284318; bh=dpSSTSPDfm32UkoTk+/PGGGWBTktO6DCFMgsrabB63E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ndjk5KfH2m79n4f1ZOri/iYcXm1VcYsaPq/gUj5gZZvBuTV5Pk4dMmKSC+ETZPnr4 srTHcRk6SuecxsnMsXCyMcP9rIBPgbqjLJXELP0zNEvREInGIc8ip8oVwWso0CNKn2 m2XcwBd7TLDRF9JoFylSXOJjCLmT8lM0oEjTjmHU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mateusz Palczewski , Konrad Jankowski , Tony Nguyen , Sasha Levin Subject: [PATCH 5.17 073/219] Revert "iavf: Fix deadlock occurrence during resetting VF interface" Date: Mon, 18 Apr 2022 14:10:42 +0200 Message-Id: <20220418121207.980484389@linuxfoundation.org> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220418121203.462784814@linuxfoundation.org> References: <20220418121203.462784814@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mateusz Palczewski [ Upstream commit 7d59706dbef8de83b3662026766507bc494223d7 ] This change caused a regression with resetting while changing network namespaces. By clearing the IFF_UP flag, the kernel now thinks it has fully closed the device. This reverts commit 0cc318d2e8408bc0ffb4662a0c3e5e57005ac6ff. Fixes: 0cc318d2e840 ("iavf: Fix deadlock occurrence during resetting VF interface") Signed-off-by: Mateusz Palczewski Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/iavf/iavf_main.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c index d10e9a8e8011..f55ecb672768 100644 --- a/drivers/net/ethernet/intel/iavf/iavf_main.c +++ b/drivers/net/ethernet/intel/iavf/iavf_main.c @@ -2817,7 +2817,6 @@ static void iavf_reset_task(struct work_struct *work) running = adapter->state == __IAVF_RUNNING; if (running) { - netdev->flags &= ~IFF_UP; netif_carrier_off(netdev); netif_tx_stop_all_queues(netdev); adapter->link_up = false; @@ -2934,7 +2933,7 @@ static void iavf_reset_task(struct work_struct *work) * to __IAVF_RUNNING */ iavf_up_complete(adapter); - netdev->flags |= IFF_UP; + iavf_irq_enable(adapter, true); } else { iavf_change_state(adapter, __IAVF_DOWN); @@ -2950,10 +2949,8 @@ static void iavf_reset_task(struct work_struct *work) reset_err: mutex_unlock(&adapter->client_lock); mutex_unlock(&adapter->crit_lock); - if (running) { + if (running) iavf_change_state(adapter, __IAVF_RUNNING); - netdev->flags |= IFF_UP; - } dev_err(&adapter->pdev->dev, "failed to allocate resources during reinit\n"); iavf_close(netdev); } -- 2.35.1