Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3847991ybi; Mon, 10 Jun 2019 18:32:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqzVaVAHG9lYcX1iDHX4Jl31sbC1zvoelpJP8CN6cAWc5/54AZZQ8wnnA83J2kaFgoIZ8+WP X-Received: by 2002:a17:902:8303:: with SMTP id bd3mr73118330plb.240.1560216757136; Mon, 10 Jun 2019 18:32:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560216757; cv=none; d=google.com; s=arc-20160816; b=OlBjf6+1u8Bc6mFy3LsP4J3jLoxQFGqL7jXRASYXa1f7vsO04meb/z7LgdjZVoZyq3 lKmuAQ9nCbUJIEaPN92znX34yH0LbEJGovDNQq7azJko+uBK5Kxv3dO+Zs8cUXm0nos1 1Dy3zFcP1l37fPId7Mn6xnPLAX3Ab0zipDd8Sc7jD5UPytJIjuhOZQu/FQdZKypvgfOf bTYlzWuTAiPTHOScxWGWCnEotPfMh7EVxSm2hzq732ooBvE56xdjtYmQwxOMka40NutP yEY4JHgrRJB4ZZaKcEreVLK3hbWBssdOZOEPtdbya/lgdxng/0ECyzgt5jlWgHg+QXDY o7Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=3dS1iy1YkTZTZ0qKxRzM3DtbuNOWuG0CcpcNubeMZqI=; b=SvohMehY7VQH+o2+z684K+uqmqSf5sMVxCzPkReMgpHuL+1Qb8MrXK0EJ0cTcYOOXZ RsvFmCQS5k/dU1cwojMBOhO+Ogvc4O/I8q4H32L/hcJF+x9xjX+8A4nL7TFqXCuzf+Al PXkN9WP4UALg/1znVehgJzkJVjCZwXm2nyQMsr1qmks7sE2GClN5gabDA33zmAgw1A+G TABfEB7YdeycNb2oRDnbmHN8wPHMUEOgAbg7F6gAgnAPtzZA65Ytam9/PzmJKGBSww54 /9N0dQbc3KyHMNyv0dyqtAKidijEdRp9ZhA0LUSiX5NVmwjclBQ7VmLAZRl1heLp4t3C uJ7w== 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 v7si1376014plo.9.2019.06.10.18.32.22; Mon, 10 Jun 2019 18:32:37 -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 S2390674AbfFKBah (ORCPT + 99 others); Mon, 10 Jun 2019 21:30:37 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:18122 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389168AbfFKBah (ORCPT ); Mon, 10 Jun 2019 21:30:37 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id A6DD839207DF086F103B; Tue, 11 Jun 2019 09:30:34 +0800 (CST) Received: from [10.177.30.175] (10.177.30.175) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.439.0; Tue, 11 Jun 2019 09:30:27 +0800 Subject: Re: [PATCH net-next] hinic: fix a bug in set rx mode To: dann frazier CC: , , , , References: <20190527221005.10073-1-xuechaojing@huawei.com> <20190611004514.GA23302@xps13.dannf> From: xuechaojing Message-ID: Date: Tue, 11 Jun 2019 09:30:19 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190611004514.GA23302@xps13.dannf> Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.177.30.175] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Yes, This patch fixes the Oops. xue ?? 2019/6/11 8:45, dann frazier wrote: > On Mon, May 27, 2019 at 10:10:05PM +0000, Xue Chaojing wrote: >> in set_rx_mode, __dev_mc_sync and netdev_for_each_mc_addr will >> repeatedly set the multicast mac address. so we delete this loop. > fyi, I'm told this fixes the following Oops (in case it makes sense to > queue it for stable): > > [ 642.914581] Internal error: Oops: 96000005 [#1] SMP > [ 642.919444] Modules linked in: hinic(-) 8021q garp mrp stp llc ses enclosure sg nls_utf8 isofs vfat fat loop ipmi_ssif crc32_ce crct10dif_ce ghash_c e sha2_ce sha256_arm64 sha1_ce sbsa_gwdt hns_roce_hw_v2 hns_roce ib_core ipmi_si ipmi_devintf ipmi_msghandler xfs libcrc32c marvell hibmc_drm drm_kms_h elper syscopyarea sysfillrect sysimgblt fb_sys_fops ttm qla2xxx ixgbe drm mpt3sas nvme_fc hns3 hisi_sas_v3_hw igb nvme_fabrics hisi_sas_main hclge mdio scsi_transport_fc nvme libsas hnae3 raid_class nvme_core scsi_transport_sas i2c_algo_bit gpio_dwapb gpio_generic dm_mirror dm_region_hash dm_log dm_mo d [last unloaded: hinic] > [ 642.974177] CPU: 4 PID: 5339 Comm: kworker/u256:1 Kdump: loaded Not tainted 4.18.0-74.el8.aarch64 #1 > [ 642.983293] Hardware name: Huawei TaiShan 2280 V2/BC82AMDA, BIOS TA BIOS 2280-A CS V2.16.01 03/16/2019 > [ 642.992591] Workqueue: hinic_dev set_rx_mode [hinic] > [ 642.997542] pstate: 00c00009 (nzcv daif +PAN +UAO) > [ 643.002320] pc : add_mac_addr+0xa4/0x100 [hinic] > [ 643.006924] lr : set_rx_mode+0x88/0xc0 [hinic] > [ 643.011353] sp : ffff00003228fd40 > [ 643.014653] x29: ffff00003228fd40 x28: 0000000000000000 > [ 643.019952] x27: ffffb955c362ff38 x26: ffff27ccd2cc3110 > [ 643.025250] x25: 0000000000000000 x24: ffffb955025c6b08 > [ 643.030547] x23: ffffb955025c6000 x22: 0000000000000010 > [ 643.035845] x21: ffff27cc56040488 x20: ffffb955025c6ac0 > [ 643.041142] x19: 0000000000000000 x18: 0000000000000010 > [ 643.046440] x17: 0000ffffb7135830 x16: ffff27ccd2259bb8 > [ 643.051737] x15: ffffffffffffffff x14: 2030302031302039 > [ 643.057035] x13: 33203d2072646461 x12: 2063616d20746573 > [ 643.062332] x11: 203a296465726574 x10: 0000000000000d10 > [ 643.067630] x9 : ffff00003228f9f0 x8 : ffffb95501756170 > [ 643.072927] x7 : 198c000940300814 x6 : ffff00003228fd08 > [ 643.078225] x5 : 0000000000000000 x4 : 0000000000000000 > [ 643.083523] x3 : 0000000000000000 x2 : 0000000000000001 > [ 643.088820] x1 : 0000000000000010 x0 : 00000000000000e3 > [ 643.094118] Process kworker/u256:1 (pid: 5339, stack limit = 0x0000000023b4f182) > [ 643.101498] Call trace: > [ 643.103932] add_mac_addr+0xa4/0x100 [hinic] > [ 643.108189] set_rx_mode+0x88/0xc0 [hinic] > [ 643.112272] process_one_work+0x1ac/0x3e0 > [ 643.116268] worker_thread+0x44/0x448 > [ 643.119916] kthread+0x130/0x138 > [ 643.123130] ret_from_fork+0x10/0x18 > [ 643.126692] Code: a9425bf5 a94363f7 a8c47bfd d65f03c0 (394016c7) > [ 643.132828] SMP: stopping secondary CPUs > [ 643.139859] Starting crashdump kernel... > [ 643.143771] Bye! > > -dann > >> Signed-off-by: Xue Chaojing >> --- >> drivers/net/ethernet/huawei/hinic/hinic_main.c | 4 ---- >> 1 file changed, 4 deletions(-) >> >> diff --git a/drivers/net/ethernet/huawei/hinic/hinic_main.c b/drivers/net/ethernet/huawei/hinic/hinic_main.c >> index e64bc664f687..cfd3f4232cac 100644 >> --- a/drivers/net/ethernet/huawei/hinic/hinic_main.c >> +++ b/drivers/net/ethernet/huawei/hinic/hinic_main.c >> @@ -724,7 +724,6 @@ static void set_rx_mode(struct work_struct *work) >> { >> struct hinic_rx_mode_work *rx_mode_work = work_to_rx_mode_work(work); >> struct hinic_dev *nic_dev = rx_mode_work_to_nic_dev(rx_mode_work); >> - struct netdev_hw_addr *ha; >> >> netif_info(nic_dev, drv, nic_dev->netdev, "set rx mode work\n"); >> >> @@ -732,9 +731,6 @@ static void set_rx_mode(struct work_struct *work) >> >> __dev_uc_sync(nic_dev->netdev, add_mac_addr, remove_mac_addr); >> __dev_mc_sync(nic_dev->netdev, add_mac_addr, remove_mac_addr); >> - >> - netdev_for_each_mc_addr(ha, nic_dev->netdev) >> - add_mac_addr(nic_dev->netdev, ha->addr); >> } >> >> static void hinic_set_rx_mode(struct net_device *netdev) > . >