1. 29 10月, 2020 1 次提交
  2. 25 9月, 2020 1 次提交
  3. 10 9月, 2020 1 次提交
  4. 26 5月, 2020 1 次提交
  5. 07 5月, 2020 1 次提交
  6. 23 4月, 2020 1 次提交
  7. 29 3月, 2020 1 次提交
  8. 25 3月, 2020 2 次提交
  9. 18 3月, 2020 1 次提交
  10. 28 8月, 2019 1 次提交
  11. 14 8月, 2019 1 次提交
    • X
      RDMA/hns: Bugfix for slab-out-of-bounds when unloading hip08 driver · 9bba3f0c
      Xi Wang 提交于
      kasan will report a BUG when run command 'rmmod hns_roce_hw_v2', the calltrace
      is as follows:
      
      ==================================================================
      BUG: KASAN: slab-out-of-bounds in hns_roce_table_mhop_put+0x584/0x828
      [hns_roce]
      Read of size 8 at addr ffff802185e08300 by task rmmod/270
      
      Call trace:
      dump_backtrace+0x0/0x1e8
      show_stack+0x14/0x20
      dump_stack+0xc4/0xfc
      print_address_description+0x60/0x270
      __kasan_report+0x164/0x1b8
      kasan_report+0xc/0x18
      __asan_load8+0x84/0xa8
      hns_roce_table_mhop_put+0x584/0x828 [hns_roce]
      hns_roce_table_put+0x174/0x1a0 [hns_roce]
      hns_roce_mr_free+0x124/0x210 [hns_roce]
      hns_roce_dereg_mr+0x90/0xb8 [hns_roce]
      ib_dealloc_pd_user+0x60/0xf0
      ib_mad_port_close+0x128/0x1d8
      ib_mad_remove_device+0x94/0x118
      remove_client_context+0xa0/0xe0
      disable_device+0xfc/0x1c0
      __ib_unregister_device+0x60/0xe0
      ib_unregister_device+0x24/0x38
      hns_roce_exit+0x3c/0x138 [hns_roce]
      __hns_roce_hw_v2_uninit_instance.isra.30+0x28/0x50 [hns_roce_hw_v2]
      hns_roce_hw_v2_uninit_instance+0x44/0x60 [hns_roce_hw_v2]
      hclge_uninit_client_instance+0x15c/0x238 [hclge]
      hnae3_uninit_client_instance+0x84/0xa8 [hnae3]
      hnae3_unregister_client+0x84/0x158 [hnae3]
      hns_roce_hw_v2_exit+0x14/0x20 [hns_roce_hw_v2]
      __arm64_sys_delete_module+0x20c/0x308
      el0_svc_handler+0xbc/0x210
      el0_svc+0x8/0xc
      
      Allocated by task 255:
      __kasan_kmalloc.isra.0+0xd0/0x180
      kasan_kmalloc+0xc/0x18
      __kmalloc+0x16c/0x328
      hns_roce_init_hem_table+0x20c/0x428 [hns_roce]
      hns_roce_init+0x214/0xfe0 [hns_roce]
      __hns_roce_hw_v2_init_instance+0x284/0x330 [hns_roce_hw_v2]
      hns_roce_hw_v2_init_instance+0xd0/0x1b8 [hns_roce_hw_v2]
      hclge_init_roce_client_instance+0x180/0x310 [hclge]
      hclge_init_client_instance+0xcc/0x508 [hclge]
      hnae3_init_client_instance.part.3+0x3c/0x80 [hnae3]
      hnae3_register_client+0x134/0x1a8 [hnae3]
      0xffff200009c00014
      do_one_initcall+0x9c/0x3e0
      do_init_module+0xd4/0x2d8
      load_module+0x3284/0x3690
      __se_sys_init_module+0x274/0x308
      __arm64_sys_init_module+0x40/0x50
      el0_svc_handler+0xbc/0x210
      el0_svc+0x8/0xc
      
      Freed by task 0:
      (stack is not available)
      
      The buggy address belongs to the object at ffff802185e06300
      which belongs to the cache kmalloc-8k of size 8192
      The buggy address is located 0 bytes to the right of
      8192-byte region [ffff802185e06300, ffff802185e08300)
      The buggy address belongs to the page:
      page:ffff7fe008617800 refcount:1 mapcount:0 mapping:ffff802340020e00 index:0x0
      compound_mapcount: 0
      flags: 0x5fffe00000010200(slab|head)
      raw: 5fffe00000010200 dead000000000100 dead000000000200 ffff802340020e00
      raw: 0000000000000000 00000000803e003e 00000001ffffffff 0000000000000000
      page dumped because: kasan: bad access detected
      
      Memory state around the buggy address:
      ffff802185e08200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      ffff802185e08280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      >ffff802185e08300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
      ^
      ffff802185e08380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
      ffff802185e08400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
      ==================================================================
      Disabling lock debugging due to kernel taint
      
      Fixes: a25d13cb ("RDMA/hns: Add the interfaces to support multi hop addressing for the contexts in hip08")
      Signed-off-by: NXi Wang <wangxi11@huawei.com>
      Link: https://lore.kernel.org/r/1565343666-73193-6-git-send-email-oulijun@huawei.comSigned-off-by: NDoug Ledford <dledford@redhat.com>
      9bba3f0c
  12. 12 8月, 2019 1 次提交
  13. 25 7月, 2019 2 次提交
  14. 26 6月, 2019 1 次提交
  15. 21 6月, 2019 1 次提交
  16. 08 6月, 2019 1 次提交
  17. 28 5月, 2019 2 次提交
  18. 09 4月, 2019 1 次提交
    • L
      RDMA/hns: Fix bug that caused srq creation to fail · 4772e03d
      Lijun Ou 提交于
      Due to the incorrect use of the seg and obj information, the position of
      the mtt is calculated incorrectly, and the free space of the page is not
      enough to store the entire mtt, resulting in access to the next page. This
      patch fixes this problem.
      
       Unable to handle kernel paging request at virtual address ffff00006e3cd000
       ...
       Call trace:
        hns_roce_write_mtt+0x154/0x2f0 [hns_roce]
        hns_roce_buf_write_mtt+0xa8/0xd8 [hns_roce]
        hns_roce_create_srq+0x74c/0x808 [hns_roce]
        ib_create_srq+0x28/0xc8
      
      Fixes: 0203b14c ("RDMA/hns: Unify the calculation for hem index in hip08")
      Signed-off-by: Nchenglang <chenglang@huawei.com>
      Signed-off-by: NLijun Ou <oulijun@huawei.com>
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      4772e03d
  19. 25 1月, 2019 2 次提交
  20. 05 12月, 2018 2 次提交
  21. 27 7月, 2018 2 次提交
  22. 28 4月, 2018 2 次提交
  23. 02 12月, 2017 1 次提交
  24. 11 11月, 2017 2 次提交
  25. 26 10月, 2017 1 次提交
  26. 29 9月, 2017 1 次提交
    • C
      RDMA/hns: make various function static, fixes warnings · 281d0ccf
      Colin Ian King 提交于
      The functions hns_roce_table_mhop_get, hns_roce_table_mhop_put,
      hns_roce_cleanup_mhop_hem_table,  hns_roce_v1_post_mbox,
      hns_roce_cmq_setup_basic_desc, hns_roce_cmq_send,
      hns_roce_cmq_query_hw_info are all local to the source and do
      not need to be in global scope, so make them static.
      
      Cleans up sparse warnings:
      symbol 'hns_roce_table_mhop_get' was not declared. Should it be static?
      symbol 'hns_roce_table_mhop_put' was not declared. Should it be static?
      symbol 'hns_roce_cleanup_mhop_hem_table' was not declared. Should it be
      static?
      symbol 'hns_roce_v1_post_mbox' was not declared. Should it be static?
      symbol 'hns_roce_cmq_setup_basic_desc' was not declared. Should it be
      static?
      symbol 'hns_roce_cmq_send' was not declared. Should it be static?
      symbol 'hns_roce_cmq_query_hw_info' was not declared. Should it be static?
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      281d0ccf
  27. 27 9月, 2017 6 次提交