1. 21 4月, 2021 3 次提交
  2. 15 4月, 2021 3 次提交
  3. 12 4月, 2021 3 次提交
  4. 10 4月, 2021 10 次提交
  5. 09 4月, 2021 10 次提交
  6. 08 4月, 2021 11 次提交
    • D
      drm/vc4: crtc: Reduce PV fifo threshold on hvs4 · eb9dfdd1
      Dom Cobley 提交于
      Experimentally have found PV on hvs4 reports fifo full
      error with expected settings and does not with one less
      
      This appears as:
      [drm:drm_atomic_helper_wait_for_flip_done] *ERROR* [CRTC:82:crtc-3] flip_done timed out
      
      with bit 10 of PV_STAT set "HVS driving pixels when the PV FIFO is full"
      
      Fixes: c8b75bca ("drm/vc4: Add KMS support for Raspberry Pi.")
      Signed-off-by: NDom Cobley <popcornmix@gmail.com>
      Signed-off-by: NMaxime Ripard <maxime@cerno.tech>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210318161328.1471556-3-maxime@cerno.tech
      eb9dfdd1
    • M
      drm/vc4: plane: Remove redundant assignment · 35d65ab3
      Maxime Ripard 提交于
      The vc4_plane_atomic_async_update function assigns twice in a row the
      src_h field in the drm_plane_state structure to the same value. Remove
      the second one.
      Reviewed-by: NDave Stevenson <dave.stevenson@raspberrypi.com>
      Signed-off-by: NMaxime Ripard <maxime@cerno.tech>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210318161328.1471556-2-maxime@cerno.tech
      35d65ab3
    • A
      virt_wifi: Return micros for BSS TSF values · b57aa17f
      A. Cody Schuffelen 提交于
      cfg80211_inform_bss expects to receive a TSF value, but is given the
      time since boot in nanoseconds. TSF values are expected to be at
      microsecond scale rather than nanosecond scale.
      Signed-off-by: NA. Cody Schuffelen <schuffelen@google.com>
      Link: https://lore.kernel.org/r/20210318200419.1421034-1-schuffelen@google.comSigned-off-by: NJohannes Berg <johannes.berg@intel.com>
      b57aa17f
    • A
      drm/amdgpu/smu7: fix CAC setting on TOPAZ · cdcc108a
      Alex Deucher 提交于
      We need to enable MC CAC for mclk switching to work.
      
      Fixes: d765129a ("drm/amd/pm: correct sclk/mclk dpm enablement")
      Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1561Tested-by: NKonstantin Kharlamov <Hi-Angel@yandex.ru>
      Reviewed-by: NEvan Quan <evan.quan@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      cdcc108a
    • X
      drm/radeon: Fix size overflow · 2efc0210
      xinhui pan 提交于
      ttm->num_pages is uint32. Hit overflow when << PAGE_SHIFT directly
      
      Fixes: 230c079f ("drm/ttm: make num_pages uint32_t")
      Signed-off-by: Nxinhui pan <xinhui.pan@amd.com>
      Reviewed-by: NChristian König <christian.koenig@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      2efc0210
    • X
      drm/amdgpu: Fix size overflow · 1b0b6e93
      xinhui pan 提交于
      ttm->num_pages is uint32. Hit overflow when << PAGE_SHIFT directly
      
      Fixes: 230c079f ("drm/ttm: make num_pages uint32_t")
      Signed-off-by: Nxinhui pan <xinhui.pan@amd.com>
      Reviewed-by: NChristian König <christian.koenig@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      1b0b6e93
    • K
      RDMA/qedr: Fix kernel panic when trying to access recv_cq · e1ad897b
      Kamal Heib 提交于
      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: NKamal Heib <kamalheib1@gmail.com>
      Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
      e1ad897b
    • T
      drm/i915: Fix invalid access to ACPI _DSM objects · b6a37a93
      Takashi Iwai 提交于
      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: NTakashi Iwai <tiwai@suse.de>
      Signed-off-by: NVille 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: NRodrigo Vivi <rodrigo.vivi@intel.com>
      b6a37a93
    • D
      clk: fixed: fix double free in resource managed fixed-factor clock · 50ce6826
      Dmitry Baryshkov 提交于
      devm_clk_hw_register_fixed_factor_release(), the release function for
      the devm_clk_hw_register_fixed_factor(), calls
      clk_hw_unregister_fixed_factor(), which will kfree() the clock. However
      after that the devres functions will also kfree the allocated data,
      resulting in double free/memory corruption. Just call
      clk_hw_unregister() instead, leaving kfree() to devres code.
      Reported-by: NRob Clark <robdclark@chromium.org>
      Cc: Daniel Palmer <daniel@0x0f.com>
      Signed-off-by: NDmitry Baryshkov <dmitry.baryshkov@linaro.org>
      Link: https://lore.kernel.org/r/20210406230606.3007138-1-dmitry.baryshkov@linaro.org
      Fixes: 0b9266d2 ("clk: fixed: add devm helper for clk_hw_register_fixed_factor()")
      [sboyd@kernel.org: Remove ugly cast]
      Signed-off-by: NStephen Boyd <sboyd@kernel.org>
      50ce6826
    • A
      net: hso: fix null-ptr-deref during tty device unregistration · 8a12f883
      Anirudh Rayabharam 提交于
      Multiple ttys try to claim the same the minor number causing a double
      unregistration of the same device. The first unregistration succeeds
      but the next one results in a null-ptr-deref.
      
      The get_free_serial_index() function returns an available minor number
      but doesn't assign it immediately. The assignment is done by the caller
      later. But before this assignment, calls to get_free_serial_index()
      would return the same minor number.
      
      Fix this by modifying get_free_serial_index to assign the minor number
      immediately after one is found to be and rename it to obtain_minor()
      to better reflect what it does. Similary, rename set_serial_by_index()
      to release_minor() and modify it to free up the minor number of the
      given hso_serial. Every obtain_minor() should have corresponding
      release_minor() call.
      
      Fixes: 72dc1c09 ("HSO: add option hso driver")
      Reported-by: syzbot+c49fe6089f295a05e6f8@syzkaller.appspotmail.com
      Tested-by: syzbot+c49fe6089f295a05e6f8@syzkaller.appspotmail.com
      Reviewed-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NAnirudh Rayabharam <mail@anirudhrb.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8a12f883
    • D
      ethtool: Remove link_mode param and derive link params from driver · a975d7d8
      Danielle Ratson 提交于
      Some drivers clear the 'ethtool_link_ksettings' struct in their
      get_link_ksettings() callback, before populating it with actual values.
      Such drivers will set the new 'link_mode' field to zero, resulting in
      user space receiving wrong link mode information given that zero is a
      valid value for the field.
      
      Another problem is that some drivers (notably tun) can report random
      values in the 'link_mode' field. This can result in a general protection
      fault when the field is used as an index to the 'link_mode_params' array
      [1].
      
      This happens because such drivers implement their set_link_ksettings()
      callback by simply overwriting their private copy of
      'ethtool_link_ksettings' struct with the one they get from the stack,
      which is not always properly initialized.
      
      Fix these problems by removing 'link_mode' from 'ethtool_link_ksettings'
      and instead have drivers call ethtool_params_from_link_mode() with the
      current link mode. The function will derive the link parameters (e.g.,
      speed) from the link mode and fill them in the 'ethtool_link_ksettings'
      struct.
      
      v3:
      	* Remove link_mode parameter and derive the link parameters in
      	  the driver instead of passing link_mode parameter to ethtool
      	  and derive it there.
      
      v2:
      	* Introduce 'cap_link_mode_supported' instead of adding a
      	  validity field to 'ethtool_link_ksettings' struct.
      
      [1]
      general protection fault, probably for non-canonical address 0xdffffc00f14cc32c: 0000 [#1] PREEMPT SMP KASAN
      KASAN: probably user-memory-access in range [0x000000078a661960-0x000000078a661967]
      CPU: 0 PID: 8452 Comm: syz-executor360 Not tainted 5.11.0-syzkaller #0
      Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
      RIP: 0010:__ethtool_get_link_ksettings+0x1a3/0x3a0 net/ethtool/ioctl.c:446
      Code: b7 3e fa 83 fd ff 0f 84 30 01 00 00 e8 16 b0 3e fa 48 8d 3c ed 60 d5 69 8a 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 e0 07 83 c0 03
      +38 d0 7c 08 84 d2 0f 85 b9
      RSP: 0018:ffffc900019df7a0 EFLAGS: 00010202
      RAX: dffffc0000000000 RBX: ffff888026136008 RCX: 0000000000000000
      RDX: 00000000f14cc32c RSI: ffffffff873439ca RDI: 000000078a661960
      RBP: 00000000ffff8880 R08: 00000000ffffffff R09: ffff88802613606f
      R10: ffffffff873439bc R11: 0000000000000000 R12: 0000000000000000
      R13: ffff88802613606c R14: ffff888011d0c210 R15: ffff888011d0c210
      FS:  0000000000749300(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 00000000004b60f0 CR3: 00000000185c2000 CR4: 00000000001506f0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      Call Trace:
       linkinfo_prepare_data+0xfd/0x280 net/ethtool/linkinfo.c:37
       ethnl_default_notify+0x1dc/0x630 net/ethtool/netlink.c:586
       ethtool_notify+0xbd/0x1f0 net/ethtool/netlink.c:656
       ethtool_set_link_ksettings+0x277/0x330 net/ethtool/ioctl.c:620
       dev_ethtool+0x2b35/0x45d0 net/ethtool/ioctl.c:2842
       dev_ioctl+0x463/0xb70 net/core/dev_ioctl.c:440
       sock_do_ioctl+0x148/0x2d0 net/socket.c:1060
       sock_ioctl+0x477/0x6a0 net/socket.c:1177
       vfs_ioctl fs/ioctl.c:48 [inline]
       __do_sys_ioctl fs/ioctl.c:753 [inline]
       __se_sys_ioctl fs/ioctl.c:739 [inline]
       __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:739
       do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
       entry_SYSCALL_64_after_hwframe+0x44/0xa9
      
      Fixes: c8907043 ("ethtool: Get link mode in use instead of speed and duplex parameters")
      Signed-off-by: NDanielle Ratson <danieller@nvidia.com>
      Reported-by: NEric Dumazet <eric.dumazet@gmail.com>
      Reviewed-by: NIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a975d7d8