Received: by 10.223.164.221 with SMTP id h29csp2059158wrb; Thu, 2 Nov 2017 05:21:03 -0700 (PDT) X-Google-Smtp-Source: ABhQp+TkYcMl+G9v5Aio5ARdGbWpYaaXJub+mfBfXFm65Sj1zNHTUcOQeGmPJSvmRKZ2F8sy95cU X-Received: by 10.84.252.133 with SMTP id y5mr2075245pll.99.1509625263076; Thu, 02 Nov 2017 05:21:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509625263; cv=none; d=google.com; s=arc-20160816; b=lTlmCmu3pIsqwXD0kwxMzjCGCVuTx0ivraPVg53xsUkoiJqTaLf3xRav0hHWaWVOyL F7a+xw+7zfLtwJCLMKCjPqW596zRcXlydS0MoUtdof8P/YhzuQMLdonBW6ZNYImHTLXx swA7SEiDM6WXayjcPeRLX2Y27FZdJe+X4JGciXcn7BI1r6E83BLBZoiUo/R8Z+4l928s jD7EenEzu7x2+U3p/kczVQQhgKPT4+reX3cUABDNAuo7QbhirlCDJw5rrCDUy+EZzfB6 4jUubmhVjvM6hlE1wVLWyitolda0W5SctJAMDuV/+iN53y+/htKr4zEPmZz7oqJhuGQ6 oFIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=/b2KbKywvQ6iSw2G6+bjNZhjBW3VDxl7BynuCAkMmoQ=; b=CM5zOsuDDa++9s1YXOgn5ZitNaPb3N8nuEwWOJe2Eht2XV+eij3xRRGWl6qOlMTTpt aK0XyE94a2fIUPKGeL1rFE2LA/a4g8sU83N6ssNTwcm3xLD7q+RXt+HSL5Sjm/P4mqqA FOQMi+8FruLUz1JmU1huIlHWK0YOL9FdiqNamh4DXPJY3dT3lNc2TwW8wXANlGFiQdPj qzB8xlibkis/Ew6wnm/SYr2Tq+th/Xase05N/xVLPXpEzEOJnFZeXPS6FWIw1urOiePr ZVE3VklFlelcFgiawf47L+7h8Pr4F1TpDkh6axvYHjHLvz3S3q9NG2A85MQbLZCe7+Dv NqLw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j89si3819396pfa.258.2017.11.02.05.20.26; Thu, 02 Nov 2017 05:21:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755232AbdKBMTL (ORCPT + 96 others); Thu, 2 Nov 2017 08:19:11 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:51493 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1754717AbdKBMTG (ORCPT ); Thu, 2 Nov 2017 08:19:06 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id B118DD9D4907F; Thu, 2 Nov 2017 20:18:50 +0800 (CST) Received: from linux-ioko.site (10.71.200.31) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.361.1; Thu, 2 Nov 2017 20:17:49 +0800 From: Lipeng To: CC: , , , , Subject: [PATCH V2 net-next 8/9] net: hns3: Fix a misuse to devm_free_irq Date: Thu, 2 Nov 2017 20:45:22 +0800 Message-ID: <1509626723-18619-9-git-send-email-lipeng321@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1509626723-18619-1-git-send-email-lipeng321@huawei.com> References: <1509626723-18619-1-git-send-email-lipeng321@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.71.200.31] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: qumingguang we should use free_irq to free the nic irq during the unloading time. because we use request_irq to apply it when nic up. It will crash if up net device after reset the port. This patch fixes the issue. Signed-off-by: qumingguang Signed-off-by: Lipeng Signed-off-by: Yunsheng Lin --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c index 39679fd..2a0af11 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c @@ -2558,9 +2558,8 @@ static int hns3_nic_uninit_vector_data(struct hns3_nic_priv *priv) (void)irq_set_affinity_hint( priv->tqp_vector[i].vector_irq, NULL); - devm_free_irq(&pdev->dev, - priv->tqp_vector[i].vector_irq, - &priv->tqp_vector[i]); + free_irq(priv->tqp_vector[i].vector_irq, + &priv->tqp_vector[i]); } priv->ring_data[i].ring->irq_init_flag = HNS3_VECTOR_NOT_INITED; -- 1.9.1 From 1582966302922729059@xxx Thu Nov 02 14:51:46 +0000 2017 X-GM-THRID: 1582662213253057274 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread