1. 09 Apr, 2021 16 commits
  2. 08 Apr, 2021 19 commits
  3. 07 Apr, 2021 5 commits
    • Kamal Heib's avatar
      RDMA/qedr: Fix kernel panic when trying to access recv_cq · e1ad897b
      Kamal Heib authored
      As INI QP does not require a recv_cq, avoid the following null pointer
      dereference by checking if the qp_type is not INI before trying to extract
      the recv_cq.
      
      BUG: kernel NULL pointer dereference, address: 00000000000000e0
       #PF: supervisor read access in kernel mode
       #PF: error_code(0x0000) - not-present page
       PGD 0 P4D 0
       Oops: 0000 [#1] SMP PTI
       CPU: 0 PID: 54250 Comm: mpitests-IMB-MP Not tainted 5.12.0-rc5 #1
       Hardware name: Dell Inc. PowerEdge R320/0KM5PX, BIOS 2.7.0 08/19/2019
       RIP: 0010:qedr_create_qp+0x378/0x820 [qedr]
       Code: 02 00 00 50 e8 29 d4 a9 d1 48 83 c4 18 e9 65 fe ff ff 48 8b 53 10 48 8b 43 18 44 8b 82 e0 00 00 00 45 85 c0 0f 84 10 74 00 00 <8b> b8 e0 00 00 00 85 ff 0f 85 50 fd ff ff e9 fd 73 00 00 48 8d bd
       RSP: 0018:ffff9c8f056f7a70 EFLAGS: 00010202
       RAX: 0000000000000000 RBX: ffff9c8f056f7b58 RCX: 0000000000000009
       RDX: ffff8c41a9744c00 RSI: ffff9c8f056f7b58 RDI: ffff8c41c0dfa280
       RBP: ffff8c41c0dfa280 R08: 0000000000000002 R09: 0000000000000001
       R10: 0000000000000000 R11: ffff8c41e06fc608 R12: ffff8c4194052000
       R13: 0000000000000000 R14: ffff8c4191546070 R15: ffff8c41c0dfa280
       FS:  00007f78b2787b80(0000) GS:ffff8c43a3200000(0000) knlGS:0000000000000000
       CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
       CR2: 00000000000000e0 CR3: 00000001011d6002 CR4: 00000000001706f0
       Call Trace:
        ib_uverbs_handler_UVERBS_METHOD_QP_CREATE+0x4e4/0xb90 [ib_uverbs]
        ? ib_uverbs_cq_event_handler+0x30/0x30 [ib_uverbs]
        ib_uverbs_run_method+0x6f6/0x7a0 [ib_uverbs]
        ? ib_uverbs_handler_UVERBS_METHOD_QP_DESTROY+0x70/0x70 [ib_uverbs]
        ? __cond_resched+0x15/0x30
        ? __kmalloc+0x5a/0x440
        ib_uverbs_cmd_verbs+0x195/0x360 [ib_uverbs]
        ? xa_load+0x6e/0x90
        ? cred_has_capability+0x7c/0x130
        ? avc_has_extended_perms+0x17f/0x440
        ? vma_link+0xae/0xb0
        ? vma_set_page_prot+0x2a/0x60
        ? mmap_region+0x298/0x6c0
        ? do_mmap+0x373/0x520
        ? selinux_file_ioctl+0x17f/0x220
        ib_uverbs_ioctl+0xa7/0x110 [ib_uverbs]
        __x64_sys_ioctl+0x84/0xc0
        do_syscall_64+0x33/0x40
        entry_SYSCALL_64_after_hwframe+0x44/0xae
       RIP: 0033:0x7f78b120262b
      
      Fixes: 06e8d1df ("RDMA/qedr: Add support for user mode XRC-SRQ's")
      Link: https://lore.kernel.org/r/20210404125501.154789-1-kamalheib1@gmail.comSigned-off-by: default avatarKamal Heib <kamalheib1@gmail.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
      e1ad897b
    • Takashi Iwai's avatar
      drm/i915: Fix invalid access to ACPI _DSM objects · b6a37a93
      Takashi Iwai authored
      intel_dsm_platform_mux_info() tries to parse the ACPI package data
      from _DSM for the debug information, but it assumes the fixed format
      without checking what values are stored in the elements actually.
      When an unexpected value is returned from BIOS, it may lead to GPF or
      NULL dereference, as reported recently.
      
      Add the checks of the contents in the returned values and skip the
      values for invalid cases.
      
      v1->v2: Check the info contents before dereferencing, too
      
      BugLink: http://bugzilla.opensuse.org/show_bug.cgi?id=1184074
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210402082317.871-1-tiwai@suse.de
      (cherry picked from commit 337d7a16)
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      b6a37a93
    • Qingqing Zhuo's avatar
      drm/amd/display: Add missing mask for DCN3 · df7232c4
      Qingqing Zhuo authored
      [Why]
      DCN3 is not reusing DCN1 mask_sh_list, causing
      SURFACE_FLIP_INT_MASK missing in the mapping.
      
      [How]
      Add the corresponding entry to DCN3 list.
      Signed-off-by: default avatarQingqing Zhuo <qingqing.zhuo@amd.com>
      Reviewed-by: default avatarNicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
      Acked-by: default avatarQingqing Zhuo <qingqing.zhuo@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      df7232c4
    • Linus Torvalds's avatar
      Merge tag 'arc-5.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc · 454859c5
      Linus Torvalds authored
      Pull ARC fixlets from Vineet Gupta:
       "A few straggler fixes for ARC"
      
      * tag 'arc-5.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
        ARC: treewide: avoid the pointer addition with NULL pointer
        arc: kernel: Return -EFAULT if copy_to_user() fails
        ARC: haps: bump memory to 1 GB
      454859c5
    • Mike Marciniszyn's avatar
      IB/hfi1: Fix probe time panic when AIP is enabled with a buggy BIOS · 5de61a47
      Mike Marciniszyn authored
      A panic can result when AIP is enabled:
      
        BUG: unable to handle kernel NULL pointer dereference at 000000000000000
        PGD 0 P4D 0
        Oops: 0000 1 SMP PTI
        CPU: 70 PID: 981 Comm: systemd-udevd Tainted: G OE --------- - - 4.18.0-240.el8.x86_64 #1
        Hardware name: Intel Corporation S2600KP/S2600KP, BIOS SE5C610.86B.01.01.0005.101720141054 10/17/2014
        RIP: 0010:__bitmap_and+0x1b/0x70
        RSP: 0018:ffff99aa0845f9f0 EFLAGS: 00010246
        RAX: 0000000000000000 RBX: ffff8d5a6fc18000 RCX: 0000000000000048
        RDX: 0000000000000000 RSI: ffffffffc06336f0 RDI: ffff8d5a8fa67750
        RBP: 0000000000000079 R08: 0000000fffffffff R09: 0000000000000000
        R10: 0000000000000000 R11: 0000000000000001 R12: ffffffffc06336f0
        R13: 00000000000000a0 R14: ffff8d5a6fc18000 R15: 0000000000000003
        FS: 00007fec137a5980(0000) GS:ffff8d5a9fa80000(0000) knlGS:0000000000000000
        CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
        CR2: 0000000000000000 CR3: 0000000a04b48002 CR4: 00000000001606e0
        Call Trace:
        hfi1_num_netdev_contexts+0x7c/0x110 [hfi1]
        hfi1_init_dd+0xd7f/0x1a90 [hfi1]
        ? pci_bus_read_config_dword+0x49/0x70
        ? pci_mmcfg_read+0x3e/0xe0
        do_init_one.isra.18+0x336/0x640 [hfi1]
        local_pci_probe+0x41/0x90
        pci_device_probe+0x105/0x1c0
        really_probe+0x212/0x440
        driver_probe_device+0x49/0xc0
        device_driver_attach+0x50/0x60
        __driver_attach+0x61/0x130
        ? device_driver_attach+0x60/0x60
        bus_for_each_dev+0x77/0xc0
        ? klist_add_tail+0x3b/0x70
        bus_add_driver+0x14d/0x1e0
        ? dev_init+0x10b/0x10b [hfi1]
        driver_register+0x6b/0xb0
        ? dev_init+0x10b/0x10b [hfi1]
        hfi1_mod_init+0x1e6/0x20a [hfi1]
        do_one_initcall+0x46/0x1c3
        ? free_unref_page_commit+0x91/0x100
        ? _cond_resched+0x15/0x30
        ? kmem_cache_alloc_trace+0x140/0x1c0
        do_init_module+0x5a/0x220
        load_module+0x14b4/0x17e0
        ? __do_sys_finit_module+0xa8/0x110
        __do_sys_finit_module+0xa8/0x110
        do_syscall_64+0x5b/0x1a0
      
      The issue happens when pcibus_to_node() returns NO_NUMA_NODE.
      
      Fix this issue by moving the initialization of dd->node to hfi1_devdata
      allocation and remove the other pcibus_to_node() calls in the probe path
      and use dd->node instead.
      
      Affinity logic is adjusted to use a new field dd->affinity_entry as a
      guard instead of dd->node.
      
      Fixes: 4730f4a6 ("IB/hfi1: Activate the dummy netdev")
      Link: https://lore.kernel.org/r/1617025700-31865-4-git-send-email-dennis.dalessandro@cornelisnetworks.com
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarMike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>
      Signed-off-by: default avatarDennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
      5de61a47