Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp214925pxx; Wed, 28 Oct 2020 03:03:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMCm9diIgpiYTKkPFy8FmFWdPpv53tkm6VH1CY7hTd5a5cev1kb+chJwPi5OBrLy8tFZ5I X-Received: by 2002:a05:6402:2076:: with SMTP id bd22mr7188200edb.197.1603879435865; Wed, 28 Oct 2020 03:03:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603879435; cv=none; d=google.com; s=arc-20160816; b=Sd0kpo+bcDL/sF8wxIRcElDsNfU/ZCWWRfu+2QdeDpy1+I60iTGWDfusQalNpfHjLI 51A0yqM9EElOP2kIEPi5/BMy4PJSx8xQWM4VQgJoPIXrf5BSPg64C7nqeu8KnWIC7o5X yw/aqJs0z8PQWKkYM+05qk+vUI8eKnJnASCwqt0Y2flwVLaxi1jTjz9E9D8nxi2FNHUl zuV2yIEVg52jk/giOTDOvfu8yW6snavxOZZBAE4FrlVV5aR32ruev7FO3tD0SGQv8PD8 RHLzH0EinblGiX1rRCJT8ZYTOmgFYsqJpM0FpBicGiU66dUN2ylcQZG8MCsvbuBZWg+N EyxQ== 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=jjZtS6TiOI1B1X+D5XkZ3LoinmgrY/P8WABARPhtL+M=; b=jxVR9UAEBwCXv8Eq2WKy9yfTq806oyUB4tt0hLKahHuVCJ6r5LqMN8A9mvN01g36B+ uPpnGIrcffnOgEHtDXDeWZWyPhYntfsGGFSxU0JVPNLvSO1Eg0mBMDDi+06DtYEujYBk nH9YSTm/dL3zFmGBRA11KApkWEMJdzG2LMQvBg8Yhx59Cz0HBqHWJfyb/NPV2z/zijrF Rh79zeHfgsudhSohv0QP/QaX2m5vs8HE5U1ZtIEWjqwMgZ2MAe1WnYnLpJoMz5Kt5j2X BPBgCTpaLTzCnpjDfSv5Q8PYpkcM7MISyD8BTramH1ximkyTc2wSMeA6sH/7OvZOPGaS QmJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2cEQfwXd; 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 q18si2524555edb.466.2020.10.28.03.03.33; Wed, 28 Oct 2020 03:03:55 -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=2cEQfwXd; 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 S2902292AbgJ0OcF (ORCPT + 99 others); Tue, 27 Oct 2020 10:32:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:56594 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2902103AbgJ0O3x (ORCPT ); Tue, 27 Oct 2020 10:29:53 -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 F044820780; Tue, 27 Oct 2020 14:29:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603808993; bh=ODdMXT6rEqYE41sd1IuwIbG6hQnUrMyDYBUkElowpf4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2cEQfwXdTkRBbhWI3rpCJi2cjhNh5uvO3+sidN2O1X+VDOfRM3wbKDSaS/yi7yoAK tWLLehCaBNTvHP93MvM3j6ShRSs8Ry1/7J7bForTNqL+X06PWCg/4HnGt/XHtg1a4j ourjOQ7Wxd3aJ8020wQ9r+3rZqLEwdWkijQAeVEg= 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.4 036/408] r8169: fix operation under forced interrupt threading Date: Tue, 27 Oct 2020 14:49:34 +0100 Message-Id: <20201027135456.754963604@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135455.027547757@linuxfoundation.org> References: <20201027135455.027547757@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 @@ -6418,7 +6418,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); @@ -6469,8 +6469,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; @@ -6503,7 +6503,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);