• C
    net/hinic: Fix call trace when the rx_buff module parameter is grater than 2 · 04edfc4f
    Chiqijun 提交于
    driver inclusion
    category: bugfix
    bugzilla: 4472 https://gitee.com/openeuler/kernel/issues/I4O2ZZ
    
    -----------------------------------------------------------------------
    
    When rx_buff is greater than 2, the driver will alloc for more than 1
    page of memory for network rx, but the __GFP_COMP gfp flag is not set,
    resulting in the following call trace:
    
    CPU: 3 PID: 494041 Comm: ping Kdump: loaded Tainted: G        W  OE     4.19.90-2106.3.0.0095.oe1.x86_64 #1
    Hardware name: Huawei Technologies Co., Ltd. RH2288H V3/BC11HGSA0, BIOS 5.15 05/21/2019
    RIP: 0010:copy_page_to_iter+0x154/0x310
    Code: 31 b8 00 10 00 00 f7 c6 00 80 00 00 74 07 0f b6 49 51 48 d3 e0 48 39 c2 0f 86 ed fe ff ff 48 c7 c7 30
    RSP: 0018:ffffbd6907d03bd8 EFLAGS: 00010286
    RAX: 0000000000000024 RBX: ffffe0ffee5b3000 RCX: 0000000000000000
    RDX: 0000000000000000 RSI: ffff9edbbfcd6858 RDI: ffff9edbbfcd6858
    RBP: 0000000000000001 R08: 000000000001574a R09: 0000000000000004
    R10: 000000000000004e R11: 0000000000000001 R12: ffffbd6907d03ed0
    R13: 0000000000002100 R14: 0000000000000030 R15: 0000000000000000
    FS:  00007f9d37244dc0(0000) GS:ffff9edbbfcc0000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 00007ffe0e715f80 CR3: 000000203c018005 CR4: 00000000001606e0
    Call Trace:
     skb_copy_datagram_iter+0x16c/0x2a0
     raw_recvmsg+0xd0/0x1f0
     inet_recvmsg+0x5b/0xd0
     ____sys_recvmsg+0x95/0x160
     ? import_iovec+0x37/0xd0
     ? copy_msghdr_from_user+0x5c/0x90
     ___sys_recvmsg+0x8c/0xd0
     ? __audit_syscall_exit+0x228/0x290
     ? kretprobe_trampoline+0x25/0x50
     ? __sys_recvmsg+0x5b/0xa0
     __sys_recvmsg+0x5b/0xa0
     do_syscall_64+0x5f/0x240
     entry_SYSCALL_64_after_hwframe+0x44/0xa9
    
    Use 'dev_alloc_pages' instead of calling ’alloc_pages_node‘ directly.
    Signed-off-by: NChiqijun <chiqijun@huawei.com>
    Reviewed-by: NWangxiaoyun <cloud.wangxiaoyun@huawei.com>
    Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
    Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
    04edfc4f
hinic_rx.c 27.2 KB