Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp246447pxx; Wed, 28 Oct 2020 04:01:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcZ71XBUwxXn8TW3mzG41Jq0WYPahdHYeg+37VkEDLFYY8hRr9DSBhH+vkDMBJoXCiA4Hb X-Received: by 2002:a1c:9d08:: with SMTP id g8mr2372368wme.171.1603882886810; Wed, 28 Oct 2020 04:01:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603882886; cv=none; d=google.com; s=arc-20160816; b=djMv2/rVLO7C28gYvBkKO6au6Pb07PScGeW8oMKa0O/qEzxWsJM0w3mL8ggQse3E6e BJqGhwst5+5oRHlsoVEh46Pz3NCcfsJyBTiwE3f6qFRc2Yew3c5v4nQrCOFZx+1fmIkS Sfg411oZiUGmNsmBd+BxEM0Zomi84b68TE4/gkMv7VD38C05A0snV2d/UII3YYV0a/24 n9haA/6aowenibvhjTiyRCwNGuLBUDfBIjpw811QqTjoPw9me/7Ve7i/lbLmMn7+pKvi ES2UnEFPbrIInpqPqMtLIOena/iBx+QgrLRI7bvbVU16LsfNf6ErFQLpBMut7YW8Ht8Y 0T8w== 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=TdyKprIT3iutL8myvGWODtzv3UubOku1CPQRPplScMc=; b=QZ9VYJ/YOLhnIDPdIVOlcdd14voELDRbYL7t2XNZ717RqjyBZOv9QVfdm98vt/1X+7 hhmDuS2vLagy743T5PE5WZfN4TKEXrhFDY1xLPgQ7frpnoiLguJ2u0IhKOhoCjFbEQuX 4sAtqSPSVc7XZMK4ePFpSTUVb0fV6bFmMl4h/hRiKHbY8HyOaE476JHREeYgpwTjRhuY SRMBla7eoUZ0rlLRxDH8a4YhRzXb8fo/EO2CP+CHB+SnoMsyUmBmleMmnCf4h1RrWgtr 4CT5C9uXlpG7y/+9yVn4qcKTiOYCMBeSnEly2TaJohxqd5a5Qi55yyBcMlK6Aia2dns7 9CNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RxSZ3BMU; 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=fail (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 b6si3402013edu.343.2020.10.28.04.01.03; Wed, 28 Oct 2020 04:01:26 -0700 (PDT) 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=@kernel.org header.s=default header.b=RxSZ3BMU; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1783565AbgJ0O60 (ORCPT + 99 others); Tue, 27 Oct 2020 10:58:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:50580 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1773079AbgJ0OvI (ORCPT ); Tue, 27 Oct 2020 10:51:08 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 24E6E207DE; Tue, 27 Oct 2020 14:51:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603810267; bh=IbrBttr252SB39PQbupv/VG2aRjO9sVcimOpjFXrj5s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RxSZ3BMUI9oQBZm2Jv4ow2OLvKyNIZGgNClS4gtuSR7uJF4f67KJBgoySkcdUAtzq KohTwZEYDkKW+iBmLkWDMrdV/VVDwsI6TPHM0o732H9HPOmQWcd/8YWGYBYohaP6V4 /IrXDWib5Svm/gqyyUKSj1Mh+bxctd6TOSM5LRu8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Heiner Kallweit , Jakub Kicinski Subject: [PATCH 5.8 049/633] r8169: fix operation under forced interrupt threading Date: Tue, 27 Oct 2020 14:46:32 +0100 Message-Id: <20201027135524.996920454@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Heiner Kallweit [ Upstream commit 424a646e072a887aa87283b53aa6f8b19c2a7bef ] For several network drivers it was reported that using __napi_schedule_irqoff() is unsafe with forced threading. One way to fix this is switching back to __napi_schedule, but then we lose the benefit of the irqoff version in general. As stated by Eric it doesn't make sense to make the minimal hard irq handlers in drivers using NAPI a thread. Therefore ensure that the hard irq handler is never thread-ified. Fixes: 9a899a35b0d6 ("r8169: switch to napi_schedule_irqoff") Link: https://lkml.org/lkml/2020/10/18/19 Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/4d3ef84a-c812-5072-918a-22a6f6468310@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/realtek/r8169_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c @@ -4675,7 +4675,7 @@ static int rtl8169_close(struct net_devi phy_disconnect(tp->phydev); - pci_free_irq(pdev, 0, tp); + free_irq(pci_irq_vector(pdev, 0), tp); dma_free_coherent(&pdev->dev, R8169_RX_RING_BYTES, tp->RxDescArray, tp->RxPhyAddr); @@ -4726,8 +4726,8 @@ static int rtl_open(struct net_device *d rtl_request_firmware(tp); - retval = pci_request_irq(pdev, 0, rtl8169_interrupt, NULL, tp, - dev->name); + retval = request_irq(pci_irq_vector(pdev, 0), rtl8169_interrupt, + IRQF_NO_THREAD | IRQF_SHARED, dev->name, tp); if (retval < 0) goto err_release_fw_2; @@ -4759,7 +4759,7 @@ out: return retval; err_free_irq: - pci_free_irq(pdev, 0, tp); + free_irq(pci_irq_vector(pdev, 0), tp); err_release_fw_2: rtl_release_firmware(tp); rtl8169_rx_clear(tp);