[hns-1126]net: hns3: fix GFP flag error in hclge_mac_update_stats()
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kunpeng920 |
Fix Released
|
Undecided
|
Unassigned | ||
Ubuntu-18.04 |
Invalid
|
Undecided
|
Unassigned | ||
Ubuntu-18.04-hwe |
Fix Released
|
Undecided
|
Unassigned | ||
Ubuntu-19.04 |
Invalid
|
Undecided
|
Unassigned | ||
Ubuntu-19.10 |
Invalid
|
Undecided
|
Unassigned | ||
Ubuntu-20.04 |
Fix Released
|
Undecided
|
Unassigned | ||
Upstream-kernel |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
"[Bug Description]
When CONFIG_
GFP_KERNEL in hclge_mac_
[ 52.514677] BUG: sleeping function called from invalid context at mm/slab.h:501
[ 52.522051] in_atomic(): 0, irqs_disabled(): 0, pid: 1015, name: ifconfig
[ 52.528827] 2 locks held by ifconfig/1015:
[ 52.532921] #0: (____ptrval____) (&p->lock){....}, at: seq_read+0x54/0x748
[ 52.539878] #1: (____ptrval____) (rcu_read_
[ 52.547610] CPU: 16 PID: 1015 Comm: ifconfig Not tainted 5.3.0-rc3-
[ 52.555408] Hardware name: Huawei TaiShan 2280 V2/BC82AMDC, BIOS 2280-V2 CS V3.B050.01 08/08/2019
[ 52.564242] Call trace:
[ 52.566687] dump_backtrace+
[ 52.570338] show_stack+
[ 52.573646] dump_stack+
[ 52.576950] ___might_
[ 52.580773] __might_
[ 52.584338] __kmalloc+
[ 52.587744] hclge_mac_
[ 52.592870] hclge_update_
[ 52.597651] hns3_nic_
[ 52.602514] dev_get_
[ 52.606165] dev_seq_
[ 52.610420] dev_seq_
[ 52.613898] seq_read+
[ 52.617205] proc_reg_
[ 52.620857] __vfs_read+
[ 52.624162] vfs_read+0xa0/0x190
[ 52.627380] ksys_read+
[ 52.630685] __arm64_
[ 52.634509] el0_svc_
[ 52.639369] el0_svc_
[ 52.643106] el0_svc+0x8/0xc
[Steps to Reproduce]
1.upgrade kernel with CONFIG_
2.load PF driver
3.link up port
[Actual Results]
print bug message
[Expected Results]
ok
[Reproducibility]
Inevitably
[Additional information]
Hardware: D06
Firmware: NA
Kernel: NA
[Resolution]
This patch uses GFP_ATOMIC instead of GFP_KERNEL to fix it."
net: hns3: fix GFP flag error in hclge_mac_
net: hns3: add statistics for PFC frames and MAC control frames
Changed in kunpeng920: | |
status: | Triaged → Fix Committed |
Changed in kunpeng920: | |
status: | Fix Committed → Fix Released |
From what I can tell, the following patch *introduced* the BUG(): update_ stats()
net: hns3: add statistics for PFC frames and MAC control frames
And the following patch fixes it:
net: hns3: fix GFP flag error in hclge_mac_
Both patches landed in v5.4. As long as we do not backport the first patch, we do not require the second.