1. 21 May, 2022 1 commit
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2022-05-21' of git://anongit.freedesktop.org/drm/drm · 93413c84
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Few final fixes for 5.18, one amdgpu, core dp mst leak fix, dma-buf
        two fixes, and i915 has a few fixes, one for a regression on older
        GM45 chipsets,
      
        dma-buf:
         - ioctl userspace use fix
         - fix dma-buf sysfs name generation
      
        core:
         - dp/mst leak fix
      
        amdgpu:
         - suspend/resume regression fix
      
        i915:
         - fix for #5806: GPU hangs and display artifacts on Intel GM45
         - reject DMC with out-of-spec MMIO
         - correctly mark guilty contexts on GuC reset"
      
      * tag 'drm-fixes-2022-05-21' of git://anongit.freedesktop.org/drm/drm:
        drm/i915: Use i915_gem_object_ggtt_pin_ww for reloc_iomap
        drm/amd: Don't reset dGPUs if the system is going to s2idle
        drm/dp/mst: fix a possible memory leak in fetch_monitor_name()
        dma-buf: fix use of DMA_BUF_SET_NAME_{A,B} in userspace
        i915/guc/reset: Make __guc_reset_context aware of guilty engines
        drm/i915/dmc: Add MMIO range restrictions
        dma-buf: ensure unique directory name for dmabuf stats
      93413c84
  2. 20 May, 2022 11 commits
  3. 19 May, 2022 19 commits
  4. 18 May, 2022 9 commits
    • Linus Torvalds's avatar
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · db1fd3fc
      Linus Torvalds authored
      Pull mlx5 fix from Michael Tsirkin:
       "One last minute fixup
      
        The patch has been on list for a while but as it was posted as part of
        a thread it was missed"
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
        vdpa/mlx5: Use consistent RQT size
      db1fd3fc
    • Mario Limonciello's avatar
      drm/amd: Don't reset dGPUs if the system is going to s2idle · 7123d39d
      Mario Limonciello authored
      An A+A configuration on ASUS ROG Strix G513QY proves that the ASIC
      reset for handling aborted suspend can't work with s2idle.
      
      This functionality was introduced in commit daf8de08 ("drm/amdgpu:
      always reset the asic in suspend (v2)").  A few other commits have
      gone on top of the ASIC reset, but this still doesn't work on the A+A
      configuration in s2idle.
      
      Avoid doing the reset on dGPUs specifically when using s2idle.
      
      Fixes: daf8de08 ("drm/amdgpu: always reset the asic in suspend (v2)")
      Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2008Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarMario Limonciello <mario.limonciello@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      7123d39d
    • Ilya Dryomov's avatar
      libceph: fix misleading ceph_osdc_cancel_request() comment · d0bb883c
      Ilya Dryomov authored
      cancel_request() never guaranteed that after its return the OSD
      client would be completely done with the OSD request.  The callback
      (if specified) can still be invoked and a ref can still be held.
      Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
      Reviewed-by: default avatarXiubo Li <xiubli@redhat.com>
      d0bb883c
    • Ilya Dryomov's avatar
      libceph: fix potential use-after-free on linger ping and resends · 75dbb685
      Ilya Dryomov authored
      request_reinit() is not only ugly as the comment rightfully suggests,
      but also unsafe.  Even though it is called with osdc->lock held for
      write in all cases, resetting the OSD request refcount can still race
      with handle_reply() and result in use-after-free.  Taking linger ping
      as an example:
      
          handle_timeout thread                     handle_reply thread
      
                                                    down_read(&osdc->lock)
                                                    req = lookup_request(...)
                                                    ...
                                                    finish_request(req)  # unregisters
                                                    up_read(&osdc->lock)
                                                    __complete_request(req)
                                                      linger_ping_cb(req)
      
            # req->r_kref == 2 because handle_reply still holds its ref
      
          down_write(&osdc->lock)
          send_linger_ping(lreq)
            req = lreq->ping_req  # same req
            # cancel_linger_request is NOT
            # called - handle_reply already
            # unregistered
            request_reinit(req)
              WARN_ON(req->r_kref != 1)  # fires
              request_init(req)
                kref_init(req->r_kref)
      
                         # req->r_kref == 1 after kref_init
      
                                                    ceph_osdc_put_request(req)
                                                      kref_put(req->r_kref)
      
                  # req->r_kref == 0 after kref_put, req is freed
      
              <further req initialization/use> !!!
      
      This happens because send_linger_ping() always (re)uses the same OSD
      request for watch ping requests, relying on cancel_linger_request() to
      unregister it from the OSD client and rip its messages out from the
      messenger.  send_linger() does the same for watch/notify registration
      and watch reconnect requests.  Unfortunately cancel_request() doesn't
      guarantee that after it returns the OSD client would be completely done
      with the OSD request -- a ref could still be held and the callback (if
      specified) could still be invoked too.
      
      The original motivation for request_reinit() was inability to deal with
      allocation failures in send_linger() and send_linger_ping().  Switching
      to using osdc->req_mempool (currently only used by CephFS) respects that
      and allows us to get rid of request_reinit().
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
      Reviewed-by: default avatarXiubo Li <xiubli@redhat.com>
      Acked-by: default avatarJeff Layton <jlayton@kernel.org>
      75dbb685
    • Al Viro's avatar
      Fix double fget() in vhost_net_set_backend() · fb4554c2
      Al Viro authored
      Descriptor table is a shared resource; two fget() on the same descriptor
      may return different struct file references.  get_tap_ptr_ring() is
      called after we'd found (and pinned) the socket we'll be using and it
      tries to find the private tun/tap data structures associated with it.
      Redoing the lookup by the same file descriptor we'd used to get the
      socket is racy - we need to same struct file.
      
      Thanks to Jason for spotting a braino in the original variant of patch -
      I'd missed the use of fd == -1 for disabling backend, and in that case
      we can end up with sock == NULL and sock != oldsock.
      
      Cc: stable@kernel.org
      Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      fb4554c2
    • Eli Cohen's avatar
      vdpa/mlx5: Use consistent RQT size · acde3929
      Eli Cohen authored
      The current code evaluates RQT size based on the configured number of
      virtqueues. This can raise an issue in the following scenario:
      
      Assume MQ was negotiated.
      1. mlx5_vdpa_set_map() gets called.
      2. handle_ctrl_mq() is called setting cur_num_vqs to some value, lower
         than the configured max VQs.
      3. A second set_map gets called, but now a smaller number of VQs is used
         to evaluate the size of the RQT.
      4. handle_ctrl_mq() is called with a value larger than what the RQT can
         hold. This will emit errors and the driver state is compromised.
      
      To fix this, we use a new field in struct mlx5_vdpa_net to hold the
      required number of entries in the RQT. This value is evaluated in
      mlx5_vdpa_set_driver_features() where we have the negotiated features
      all set up.
      
      In addition to that, we take into consideration the max capability of RQT
      entries early when the device is added so we don't need to take consider
      it when creating the RQT.
      
      Last, we remove the use of mlx5_vdpa_max_qps() which just returns the
      max_vas / 2 and make the code clearer.
      
      Fixes: 52893733 ("vdpa/mlx5: Add multiqueue support")
      Acked-by: default avatarJason Wang <jasowang@redhat.com>
      Signed-off-by: default avatarEli Cohen <elic@nvidia.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      acde3929
    • Linus Torvalds's avatar
      Merge tag 'sound-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · ef130216
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "A collection of last-minute HD- an USB-audio quirks in addition to a
        fix for the legacy ISA wavefront driver.
      
        All look small and easy"
      
      * tag 'sound-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: usb-audio: Restore Rane SL-1 quirk
        ALSA: hda/realtek: fix right sounds and mute/micmute LEDs for HP machine
        ALSA: hda/realtek: Add quirk for TongFang devices with pop noise
        ALSA: hda/realtek: Add quirk for the Framework Laptop
        ALSA: wavefront: Proper check of get_user() error
        ALSA: hda/realtek: Add quirk for Dell Latitude 7520
        ALSA: hda - fix unused Realtek function when PM is not enabled
        ALSA: usb-audio: Don't get sample rate for MCT Trigger 5 USB-to-HDMI
      ef130216
    • Pablo Neira Ayuso's avatar
      netfilter: nf_tables: disable expression reduction infra · 9e539c5b
      Pablo Neira Ayuso authored
      Either userspace or kernelspace need to pre-fetch keys inconditionally
      before comparisons for this to work. Otherwise, register tracking data
      is misleading and it might result in reducing expressions which are not
      yet registers.
      
      First expression is also guaranteed to be evaluated always, however,
      certain expressions break before writing data to registers, before
      comparing the data, leaving the register in undetermined state.
      
      This patch disables this infrastructure by now.
      
      Fixes: b2d30654 ("netfilter: nf_tables: do not reduce read-only expressions")
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      9e539c5b
    • Ritaro Takenaka's avatar
      netfilter: flowtable: move dst_check to packet path · 2738d9d9
      Ritaro Takenaka authored
      Fixes sporadic IPv6 packet loss when flow offloading is enabled.
      
      IPv6 route GC and flowtable GC are not synchronized.
      When dst_cache becomes stale and a packet passes through the flow before
      the flowtable GC teardowns it, the packet can be dropped.
      So, it is necessary to check dst every time in packet path.
      
      Fixes: 227e1e4d ("netfilter: nf_flowtable: skip device lookup from interface index")
      Signed-off-by: default avatarRitaro Takenaka <ritarot634@gmail.com>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      2738d9d9