Skip to content
  1. Mar 18, 2023
    • Linus Torvalds's avatar
      Merge tag 'mmc-v6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · 2c50b0ca
      Linus Torvalds authored
      Pull MMC host fixes from Ulf Hansson:
      
       - dw_mmc-starfive: Fix initialization of the prev_err variable
      
       - sdhci_am654: Lower power-on failed message severity
      
      * tag 'mmc-v6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
        mmc: dw_mmc-starfive: Fix initialization of prev_err
        mmc: sdhci_am654: lower power-on failed message severity
      2c50b0ca
    • Linus Torvalds's avatar
      Merge tag 'sound-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 97eb2d98
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Nothing surprising, a collection of small device-specific fixes.
      
        The majority of changes are for ASoC Intel stuff, while a few other
        ASoC and HD-audio fixes are found"
      
      * tag 'sound-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (31 commits)
        ALSA: hda/ca0132: fixup buffer overrun at tuning_ctl_set()
        ALSA: asihpi: check pao in control_message()
        ASoC: hdmi-codec: only startup/shutdown on supported streams
        ASoC: da7219: Initialize jack_det_mutex
        ALSA: hda: Match only Intel devices with CONTROLLER_IN_GPU()
        ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book2 Pro
        ALSA: hda/realtek: fix speaker, mute/micmute LEDs not work on a HP platform
        ALSA: hda: intel-dsp-config: add MTL PCI id
        ASoC: SOF: IPC4: update gain ipc msg definition to align with fw
        ASoC: SOF: sof-audio: don't squelch errors in WIDGET_SETUP phase
        ASoC: SOF: Intel: hda-ctrl: re-add sleep after entering and exiting reset
        ASoC: SOF: Intel: hda-dsp: harden D0i3 programming sequence
        ASoC: SOF: ipc4-topology: set dmic dai index from copier
        ASoC: SOF: sof-audio: Fix broken early bclk feature for SSP
        ASoC: SOF: Intel: pci-tng: revert invalid bar size setting
        ASoC: SOF: topology: Fix error handling in sof_widget_ready()
        ASoC: Intel: soc-acpi: fix copy-paste issue in topology names
        ASoC: SOF: ipc4-topology: Fix incorrect sample rate print unit
        ASoC: SOF: ipc3: Check for upper size limit for the received message
        ASOC: SOF: Intel: pci-tgl: Fix device description
        ...
      97eb2d98
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2023-03-17' of git://anongit.freedesktop.org/drm/drm · 2cf5a401
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Seems like a pretty regular rc3, i915 and amdgpu with the usual
        selection of fixes, then a scattering of fixes across misc drivers and
        other areas:
      
        accel:
         - build fix for accel
      
        edid:
         - fix info leak in edid
      
        ttm:
         - fix NULL ptr deref
         - reference counting fix
      
        i915:
         - Fix hwmon PL1 power limit enabling
         - Fix audio ELD handling for DP MST
         - Fix PSR io and wake line calculations
         - Fix DG2 HDMI modes with 267.30 and 319.89 MHz pixel clocks
         - Fix SSEU subslice out-of-bounds access
         - Fix misuse of non-idle barriers as fence trackers
      
        amdgpu:
         - SMU 13 update
         - RDNA2 suspend/resume fix when overclocking is enabled
         - SRIOV VCN fixes
         - HDCP suspend/resume fix
         - Fix drm polling splat regression
         - Fix dirty rectangle tracking for PSR
         - Fix vangogh regression on certain BIOSes
         - Misc display fixes
         - Suspend/resume IOMMU regression fix
      
        amdkfd:
         - Fix BO offset for multi-VMA page migration
         - Fix a possible double free
         - Fix potential use after free
         - Fix process cleanup on module exit
      
        bridge:
         - fix returned array size name documentation
      
        fbdev:
         - ref-counting fix for fbdev deferred I/O
      
        virtio:
         - dma sync fix
      
        shmem-helper:
         - error path fix
      
        msm:
         - shrinker blocking fix
      
        panfrost:
         - shrinker rpm fix
      
        chipsfb:
         - fix error code
      
        meson:
         - fix 1px pink line
         - fix regulator interaction
      
        sun4i:
         - fix missing component unbind"
      
      * tag 'drm-fixes-2023-03-17' of git://anongit.freedesktop.org/drm/drm: (38 commits)
        drm/ttm: drop extra ttm_bo_put in ttm_bo_cleanup_refs
        drm/amdgpu: Don't resume IOMMU after incomplete init
        drm/amdkfd: Fixed kfd_process cleanup on module exit.
        drm/amd/display: disconnect MPCC only on OTG change
        drm/amd/display: Fix DP MST sinks removal issue
        drm/amd/display: Do not set DRR on pipe Commit
        drm/amd/display: Remove OTG DIV register write for Virtual signals.
        drm/meson: dw-hdmi: Fix devm_regulator_*get_enable*() conversion again
        drm/bridge: Fix returned array size name for atomic_get_input_bus_fmts kdoc
        drm/amdgpu/vcn: Disable indirect SRAM on Vangogh broken BIOSes
        drm/amdgpu/nv: fix codec array for SR_IOV
        drm/amd/display: Write to correct dirty_rect
        drm/amdgpu: move poll enabled/disable into non DC path
        drm/amd/display: Fix HDCP failing to enable after suspend
        drm/amdkfd: fix potential kgd_mem UAFs
        drm/amdgpu/vcn: custom video info caps for sriov
        drm/amd/pm: Fix sienna cichlid incorrect OD volage after resume
        drm/amd/pm: bump SMU 13.0.4 driver_if header version
        drm/amdkfd: fix a potential double free in pqm_create_queue
        drm/amdkfd: Get prange->offset after svm_range_vram_node_new
        ...
      2cf5a401
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 7622976c
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Ten patches, eight in drivers and two in the core, which correct a
        regression from directory removal and add a no VPD size quirk also to
        fix a regression. All pretty small"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: ufs: mcq: Use active_reqs to check busy in clock scaling
        scsi: core: Fix a procfs host directory removal regression
        scsi: core: Add BLIST_NO_VPD_SIZE for some VDASD
        scsi: mpi3mr: Fix expander node leak in mpi3mr_remove()
        scsi: mpi3mr: Fix memory leaks in mpi3mr_init_ioc()
        scsi: mpi3mr: Fix sas_hba.phy memory leak in mpi3mr_remove()
        scsi: mpi3mr: Fix mpi3mr_hba_port memory leak in mpi3mr_remove()
        scsi: mpi3mr: Fix config page DMA memory leak
        scsi: mpi3mr: Fix throttle_groups memory leak
        scsi: mpt3sas: Fix NULL pointer access in mpt3sas_transport_port_add()
      7622976c
  2. Mar 17, 2023
    • Christian König's avatar
      drm/ttm: drop extra ttm_bo_put in ttm_bo_cleanup_refs · c00133a9
      Christian König authored
      
      
      That was accidentially left over when we switched to the delayed delete
      worker.
      
      Suggested-by: default avatarMatthew Auld <matthew.william.auld@gmail.com>
      Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
      Fixes: 9bff18d1
      
       ("drm/ttm: use per BO cleanup workers")
      Reported-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      Tested-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20230316072647.406707-1-christian.koenig@amd.com
      c00133a9
    • Dave Airlie's avatar
      Merge tag 'amd-drm-fixes-6.3-2023-03-15' of... · c31a72db
      Dave Airlie authored
      
      Merge tag 'amd-drm-fixes-6.3-2023-03-15' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes
      
      amd-drm-fixes-6.3-2023-03-15:
      
      amdgpu:
      - SMU 13 update
      - RDNA2 suspend/resume fix when overclocking is enabled
      - SRIOV VCN fixes
      - HDCP suspend/resume fix
      - Fix drm polling splat regression
      - Fix dirty rectangle tracking for PSR
      - Fix vangogh regression on certain BIOSes
      - Misc display fixes
      - Suspend/resume IOMMU regression fix
      
      amdkfd:
      - Fix BO offset for multi-VMA page migration
      - Fix a possible double free
      - Fix potential use after free
      - Fix process cleanup on module exit
      
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Alex Deucher <alexander.deucher@amd.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20230315224400.7558-1-alexander.deucher@amd.com
      c31a72db
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2023-03-15' of... · 2a210e6a
      Dave Airlie authored
      
      Merge tag 'drm-intel-fixes-2023-03-15' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
      
      drm/i915 fixes for v6.3-rc3:
      - Fix hwmon PL1 power limit enabling
      - Fix audio ELD handling for DP MST
      - Fix PSR io and wake line calculations
      - Fix DG2 HDMI modes with 267.30 and 319.89 MHz pixel clocks
      - Fix SSEU subslice out-of-bounds access
      - Fix misuse of non-idle barriers as fence trackers
      
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Jani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/87r0tq5nyn.fsf@intel.com
      2a210e6a
    • Dave Airlie's avatar
      Merge tag 'drm-misc-fixes-2023-03-16' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes · bcd9d56f
      Dave Airlie authored
      
      
      Short summary of fixes pull:
      
       * fix info leak in edid
       * build fix for accel/
       * ref-counting fix for fbdev deferred I/O
       * driver fixes
      
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Thomas Zimmermann <tzimmermann@suse.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20230316143347.GA9246@linux-uq9g
      bcd9d56f
    • Linus Torvalds's avatar
      Merge tag '6.3-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 · 38e04b3e
      Linus Torvalds authored
      Pull cifs client fixes from Steve French:
       "Seven cifs/smb3 client fixes, all also for stable:
      
         - four DFS fixes
      
         - multichannel reconnect fix
      
         - fix smb1 stats for cancel command
      
         - fix for set file size error path"
      
      * tag '6.3-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: use DFS root session instead of tcon ses
        cifs: return DFS root session id in DebugData
        cifs: fix use-after-free bug in refresh_cache_worker()
        cifs: set DFS root session in cifs_get_smb_ses()
        cifs: generate signkey for the channel that's reconnecting
        cifs: Fix smb2_set_path_size()
        cifs: Move the in_send statistic to __smb_send_rqst()
      38e04b3e
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 0ddc84d2
      Linus Torvalds authored
      Pull kvm fixes from Paolo Bonzini:
       "ARM64:
      
         - Address a rather annoying bug w.r.t. guest timer offsetting. The
           synchronization of timer offsets between vCPUs was broken, leading
           to inconsistent timer reads within the VM.
      
        x86:
      
         - New tests for the slow path of the EVTCHNOP_send Xen hypercall
      
         - Add missing nVMX consistency checks for CR0 and CR4
      
         - Fix bug that broke AMD GATag on 512 vCPU machines
      
        Selftests:
      
         - Skip hugetlb tests if huge pages are not available
      
         - Sync KVM exit reasons"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: selftests: Sync KVM exit reasons in selftests
        KVM: selftests: Add macro to generate KVM exit reason strings
        KVM: selftests: Print expected and actual exit reason in KVM exit reason assert
        KVM: selftests: Make vCPU exit reason test assertion common
        KVM: selftests: Add EVTCHNOP_send slow path test to xen_shinfo_test
        KVM: selftests: Use enum for test numbers in xen_shinfo_test
        KVM: selftests: Add helpers to make Xen-style VMCALL/VMMCALL hypercalls
        KVM: selftests: Move the guts of kvm_hypercall() to a separate macro
        KVM: SVM: WARN if GATag generation drops VM or vCPU ID information
        KVM: SVM: Modify AVIC GATag to support max number of 512 vCPUs
        KVM: SVM: Fix a benign off-by-one bug in AVIC physical table mask
        selftests: KVM: skip hugetlb tests if huge pages are not available
        KVM: VMX: Use tabs instead of spaces for indentation
        KVM: VMX: Fix indentation coding style issue
        KVM: nVMX: remove unnecessary #ifdef
        KVM: nVMX: add missing consistency checks for CR0 and CR4
        KVM: arm64: timers: Convert per-vcpu virtual offset to a global value
      0ddc84d2
  3. Mar 16, 2023
  4. Mar 15, 2023
    • Marek Szyprowski's avatar
      drm/meson: dw-hdmi: Fix devm_regulator_*get_enable*() conversion again · 4028cbf8
      Marek Szyprowski authored
      devm_regulator_get_enable_optional() returns -ENODEV if requested
      optional regulator is not present. Adjust code for that, because in the
      67d0a301
      
       I've incorrectly assumed that it also returns 0 when
      regulator is not present.
      
      Reported-by: default avatarRicardo Cañuelo <ricardo.canuelo@collabora.com>
      Fixes: 67d0a301
      
       ("drm/meson: dw-hdmi: Fix devm_regulator_*get_enable*() conversion")
      Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
      Acked-by: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
      Acked-by: default avatarNeil Armstrong <neil.armstrong@linaro.org>
      Signed-off-by: default avatarNeil Armstrong <neil.armstrong@linaro.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20230309152446.104913-1-m.szyprowski@samsung.com
      4028cbf8
    • Liu Ying's avatar
      drm/bridge: Fix returned array size name for atomic_get_input_bus_fmts kdoc · 0d3c9333
      Liu Ying authored
      The returned array size for input formats is set through
      atomic_get_input_bus_fmts()'s 'num_input_fmts' argument, so use
      'num_input_fmts' to represent the array size in the function's kdoc,
      not 'num_output_fmts'.
      
      Fixes: 91ea8330 ("drm/bridge: Fix the bridge kernel doc")
      Fixes: f32df58a
      
       ("drm/bridge: Add the necessary bits to support bus format negotiation")
      Signed-off-by: default avatarLiu Ying <victor.liu@nxp.com>
      Reviewed-by: default avatarRobert Foss <rfoss@kernel.org>
      Signed-off-by: default avatarNeil Armstrong <neil.armstrong@linaro.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20230314055035.3731179-1-victor.liu@nxp.com
      0d3c9333
    • Paulo Alcantara's avatar
      cifs: use DFS root session instead of tcon ses · 6284e46b
      Paulo Alcantara authored
      
      
      Use DFS root session whenever possible to get new DFS referrals
      otherwise we might end up with an IPC tcon (tcon->ses->tcon_ipc) that
      doesn't respond to them.  It should be safe accessing
      @ses->dfs_root_ses directly in cifs_inval_name_dfs_link_error() as it
      has same lifetime as of @tcon.
      
      Signed-off-by: default avatarPaulo Alcantara (SUSE) <pc@manguebit.com>
      Cc: stable@vger.kernel.org # 6.2
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      6284e46b
    • Paulo Alcantara's avatar
      cifs: return DFS root session id in DebugData · f446a630
      Paulo Alcantara authored
      
      
      Return the DFS root session id in /proc/fs/cifs/DebugData to make it
      easier to track which IPC tcon was used to get new DFS referrals for a
      specific connection, and aids in debugging.
      
      A simple output of it would be
      
        Sessions:
        1) Address: 192.168.1.13 Uses: 1 Capability: 0x300067   Session Status: 1
        Security type: RawNTLMSSP  SessionId: 0xd80000000009
        User: 0 Cred User: 0
        DFS root session id: 0x128006c000035
      
      Signed-off-by: default avatarPaulo Alcantara (SUSE) <pc@manguebit.com>
      Cc: stable@vger.kernel.org # 6.2
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      f446a630
    • Linus Torvalds's avatar
      sched_getaffinity: don't assume 'cpumask_size()' is fully initialized · 6015b1ac
      Linus Torvalds authored
      
      
      The getaffinity() system call uses 'cpumask_size()' to decide how big
      the CPU mask is - so far so good.  It is indeed the allocation size of a
      cpumask.
      
      But the code also assumes that the whole allocation is initialized
      without actually doing so itself.  That's wrong, because we might have
      fixed-size allocations (making copying and clearing more efficient), but
      not all of it is then necessarily used if 'nr_cpu_ids' is smaller.
      
      Having checked other users of 'cpumask_size()', they all seem to be ok,
      either using it purely for the allocation size, or explicitly zeroing
      the cpumask before using the size in bytes to copy it.
      
      See for example the ublk_ctrl_get_queue_affinity() function that uses
      the proper 'zalloc_cpumask_var()' to make sure that the whole mask is
      cleared, whether the storage is on the stack or if it was an external
      allocation.
      
      Fix this by just zeroing the allocation before using it.  Do the same
      for the compat version of sched_getaffinity(), which had the same logic.
      
      Also, for consistency, make sched_getaffinity() use 'cpumask_bits()' to
      access the bits.  For a cpumask_var_t, it ends up being a pointer to the
      same data either way, but it's just a good idea to treat it like you
      would a 'cpumask_t'.  The compat case already did that.
      
      Reported-by: default avatarRyan Roberts <ryan.roberts@arm.com>
      Link: https://lore.kernel.org/lkml/7d026744-6bd6-6827-0471-b5e8eae0be3f@arm.com/
      Cc: Yury Norov <yury.norov@gmail.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6015b1ac
    • Paulo Alcantara's avatar
      cifs: fix use-after-free bug in refresh_cache_worker() · 396935de
      Paulo Alcantara authored
      
      
      The UAF bug occurred because we were putting DFS root sessions in
      cifs_umount() while DFS cache refresher was being executed.
      
      Make DFS root sessions have same lifetime as DFS tcons so we can avoid
      the use-after-free bug is DFS cache refresher and other places that
      require IPCs to get new DFS referrals on.  Also, get rid of mount
      group handling in DFS cache as we no longer need it.
      
      This fixes below use-after-free bug catched by KASAN
      
      [ 379.946955] BUG: KASAN: use-after-free in __refresh_tcon.isra.0+0x10b/0xc10 [cifs]
      [ 379.947642] Read of size 8 at addr ffff888018f57030 by task kworker/u4:3/56
      [ 379.948096]
      [ 379.948208] CPU: 0 PID: 56 Comm: kworker/u4:3 Not tainted 6.2.0-rc7-lku #23
      [ 379.948661] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS
      rel-1.16.0-0-gd239552-rebuilt.opensuse.org 04/01/2014
      [ 379.949368] Workqueue: cifs-dfscache refresh_cache_worker [cifs]
      [ 379.949942] Call Trace:
      [ 379.950113] <TASK>
      [ 379.950260] dump_stack_lvl+0x50/0x67
      [ 379.950510] print_report+0x16a/0x48e
      [ 379.950759] ? __virt_addr_valid+0xd8/0x160
      [ 379.951040] ? __phys_addr+0x41/0x80
      [ 379.951285] kasan_report+0xdb/0x110
      [ 379.951533] ? __refresh_tcon.isra.0+0x10b/0xc10 [cifs]
      [ 379.952056] ? __refresh_tcon.isra.0+0x10b/0xc10 [cifs]
      [ 379.952585] __refresh_tcon.isra.0+0x10b/0xc10 [cifs]
      [ 379.953096] ? __pfx___refresh_tcon.isra.0+0x10/0x10 [cifs]
      [ 379.953637] ? __pfx___mutex_lock+0x10/0x10
      [ 379.953915] ? lock_release+0xb6/0x720
      [ 379.954167] ? __pfx_lock_acquire+0x10/0x10
      [ 379.954443] ? refresh_cache_worker+0x34e/0x6d0 [cifs]
      [ 379.954960] ? __pfx_wb_workfn+0x10/0x10
      [ 379.955239] refresh_cache_worker+0x4ad/0x6d0 [cifs]
      [ 379.955755] ? __pfx_refresh_cache_worker+0x10/0x10 [cifs]
      [ 379.956323] ? __pfx_lock_acquired+0x10/0x10
      [ 379.956615] ? read_word_at_a_time+0xe/0x20
      [ 379.956898] ? lockdep_hardirqs_on_prepare+0x12/0x220
      [ 379.957235] process_one_work+0x535/0x990
      [ 379.957509] ? __pfx_process_one_work+0x10/0x10
      [ 379.957812] ? lock_acquired+0xb7/0x5f0
      [ 379.958069] ? __list_add_valid+0x37/0xd0
      [ 379.958341] ? __list_add_valid+0x37/0xd0
      [ 379.958611] worker_thread+0x8e/0x630
      [ 379.958861] ? __pfx_worker_thread+0x10/0x10
      [ 379.959148] kthread+0x17d/0x1b0
      [ 379.959369] ? __pfx_kthread+0x10/0x10
      [ 379.959630] ret_from_fork+0x2c/0x50
      [ 379.959879] </TASK>
      
      Signed-off-by: default avatarPaulo Alcantara (SUSE) <pc@manguebit.com>
      Cc: stable@vger.kernel.org # 6.2
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      396935de
    • Paulo Alcantara's avatar
      cifs: set DFS root session in cifs_get_smb_ses() · b56bce50
      Paulo Alcantara authored
      
      
      Set the DFS root session pointer earlier when creating a new SMB
      session to prevent racing with smb2_reconnect(), cifs_reconnect_tcon()
      and DFS cache refresher.
      
      Signed-off-by: default avatarPaulo Alcantara (SUSE) <pc@manguebit.com>
      Cc: stable@vger.kernel.org # 6.2
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      b56bce50
    • Linus Torvalds's avatar
      Merge tag 'mm-hotfixes-stable-2023-03-14-16-51' of... · 26e2878b
      Linus Torvalds authored
      Merge tag 'mm-hotfixes-stable-2023-03-14-16-51' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
      
      Pull misc fixes from Andrew Morton:
       "Eleven hotfixes.
      
        Four of these are cc:stable and the remainder address post-6.2 issues
        or aren't considered suitable for backporting.
      
        Seven of these fixes are for MM"
      
      * tag 'mm-hotfixes-stable-2023-03-14-16-51' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
        mm/damon/paddr: fix folio_nr_pages() after folio_put() in damon_pa_mark_accessed_or_deactivate()
        mm/damon/paddr: fix folio_size() call after folio_put() in damon_pa_young()
        ocfs2: fix data corruption after failed write
        migrate_pages: try migrate in batch asynchronously firstly
        migrate_pages: move split folios processing out of migrate_pages_batch()
        migrate_pages: fix deadlock in batched migration
        .mailmap: add Alexandre Ghiti personal email address
        mailmap: correct Dikshita Agarwal's Qualcomm email address
        mailmap: updates for Jarkko Sakkinen
        mm/userfaultfd: propagate uffd-wp bit when PTE-mapping the huge zeropage
        mm: teach mincore_hugetlb about pte markers
      26e2878b
    • Linus Torvalds's avatar
      Merge tag 'trace-v6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace · 29db00c2
      Linus Torvalds authored
      Pull tracing fixes from Steven Rostedt:
      
       - Do not allow histogram values to have modifies. They can cause a NULL
         pointer dereference if they do.
      
       - Warn if hist_field_name() is passed a NULL. Prevent the NULL pointer
         dereference mentioned above.
      
       - Fix invalid address look up race in lookup_rec()
      
       - Define ftrace_stub_graph conditionally to prevent linker errors
      
       - Always check if RCU is watching at all tracepoint locations
      
      * tag 'trace-v6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
        tracing: Make tracepoint lockdep check actually test something
        ftrace,kcfi: Define ftrace_stub_graph conditionally
        ftrace: Fix invalid address access in lookup_rec() when index is 0
        tracing: Check field value in hist_field_name()
        tracing: Do not let histogram values have some modifiers
      29db00c2
    • Linus Torvalds's avatar
      Merge tag 'zstd-linus-v6.3-rc3' of https://github.com/terrelln/linux · ed38ff16
      Linus Torvalds authored
      Pull zstd fixes from Nick Terrell:
       "A small number of fixes for zstd-v1.5.2.
      
        I'm not pulling in zstd-v1.5.4 from upstream this release because it
        didn't have any time to bake in linux-next, but I'm aiming for the
        next update in v6.4"
      
      * tag 'zstd-linus-v6.3-rc3' of https://github.com/terrelln/linux:
        zstd: Fix definition of assert()
        lib: zstd: Backport fix for in-place decompression
        lib: zstd: Fix -Wstringop-overflow warning
      ed38ff16
    • Linus Torvalds's avatar
      Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · c0856b7c
      Linus Torvalds authored
      Pull clk fixes from Stephen Boyd:
       "A collection of clk driver fixes, and a couple OF clk patches to fix
        regressions seen in the last few weeks. The fwnode patch broke the
        build for one driver that isn't always compiled, so I waited over the
        weekend to be certain no more build issues came up.
      
         - Mark the firmware node (fwnode) that matches the compatible in
           CLK_OF_DECLARE() as initialized to fix a regression on u8500 SoCs
           after fw_devlink stopped checking parent nodes in
           of_link_to_phandle()
      
         - Remove a couple MODULE_LICENSE macros in non-modules
      
         - Update the maintainers file for Microchip clk drivers
      
         - Use 'select' instead of 'depend on' for the REGMAP config to fix
           Kconfig issues
      
         - Use div_u64() for portable 64-bit division in K210 clk driver"
      
      * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
        clk: Avoid invalid function names in CLK_OF_DECLARE()
        clk: k210: remove an implicit 64-bit division
        MAINTAINERS: add missing clock driver coverage for Microchip FPGAs
        clk: HI655X: select REGMAP instead of depending on it
        kbuild, clk: remove MODULE_LICENSE in non-modules
        kbuild, clk: bcm2835: remove MODULE_LICENSE in non-modules
        clk: Mark a fwnode as initialized when using CLK_OF_DECLARE() macro
      c0856b7c
    • Shyam Prasad N's avatar
      cifs: generate signkey for the channel that's reconnecting · 05ce0448
      Shyam Prasad N authored
      
      
      Before my changes to how multichannel reconnects work, the
      primary channel was always used to do a non-binding session
      setup. With my changes, that is not the case anymore.
      Missed this place where channel at index 0 was forcibly
      updated with the signing key.
      
      Signed-off-by: default avatarShyam Prasad N <sprasad@microsoft.com>
      Reviewed-by: default avatarPaulo Alcantara (SUSE) <pc@manguebit.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      05ce0448
    • Volker Lendecke's avatar
      cifs: Fix smb2_set_path_size() · 211baef0
      Volker Lendecke authored
      
      
      If cifs_get_writable_path() finds a writable file, smb2_compound_op()
      must use that file's FID and not the COMPOUND_FID.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarVolker Lendecke <vl@samba.org>
      Reviewed-by: default avatarPaulo Alcantara (SUSE) <pc@manguebit.com>
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      211baef0
    • Steven Rostedt (Google)'s avatar
      tracing: Make tracepoint lockdep check actually test something · c2679254
      Steven Rostedt (Google) authored
      
      
      A while ago where the trace events had the following:
      
         rcu_read_lock_sched_notrace();
         rcu_dereference_sched(...);
         rcu_read_unlock_sched_notrace();
      
      If the tracepoint is enabled, it could trigger RCU issues if called in
      the wrong place. And this warning was only triggered if lockdep was
      enabled. If the tracepoint was never enabled with lockdep, the bug would
      not be caught. To handle this, the above sequence was done when lockdep
      was enabled regardless if the tracepoint was enabled or not (although the
      always enabled code really didn't do anything, it would still trigger a
      warning).
      
      But a lot has changed since that lockdep code was added. One is, that
      sequence no longer triggers any warning. Another is, the tracepoint when
      enabled doesn't even do that sequence anymore.
      
      The main check we care about today is whether RCU is "watching" or not.
      So if lockdep is enabled, always check if rcu_is_watching() which will
      trigger a warning if it is not (tracepoints require RCU to be watching).
      
      Note, that old sequence did add a bit of overhead when lockdep was enabled,
      and with the latest kernel updates, would cause the system to slow down
      enough to trigger kernel "stalled" warnings.
      
      Link: http://lore.kernel.org/lkml/20140806181801.GA4605@redhat.com
      Link: http://lore.kernel.org/lkml/20140807175204.C257CAC5@viggo.jf.intel.com
      Link: https://lore.kernel.org/lkml/20230307184645.521db5c9@gandalf.local.home/
      Link: https://lore.kernel.org/linux-trace-kernel/20230310172856.77406446@gandalf.local.home
      
      Cc: stable@vger.kernel.org
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: "Paul E. McKenney" <paulmck@kernel.org>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Joel Fernandes <joel@joelfernandes.org>
      Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Acked-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      Fixes: e6753f23
      
       ("tracepoint: Make rcuidle tracepoint callers use SRCU")
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      c2679254
    • Linus Torvalds's avatar
      Merge tag 'docs-6.3-fixes' of git://git.lwn.net/linux · 4979bf86
      Linus Torvalds authored
      Pull documentation fixes from Jonathan Corbet:
       "A handful of fixes and minor documentation updates"
      
      * tag 'docs-6.3-fixes' of git://git.lwn.net/linux:
        docs: vfio: fix header path
        docs: process: typo fix
        docs/mm: hugetlbfs_reserv: fix a reference to a file that doesn't exist
        docs/mm: Physical Memory: fix a reference to a file that doesn't exist
        docs: rebasing-and-merging: Drop wrong statement about git
        docs: programming-language: add Rust programming language section
        docs: programming-language: remove mention of the Intel compiler
        docs: Correct missing "d_" prefix for dentry_operations member d_weak_revalidate
        sched/doc: supplement CPU capacity with RISC-V
      4979bf86
    • Jiri Pirko's avatar
      docs: vfio: fix header path · d7ba3657
      Jiri Pirko authored
      
      
      The text points to a different header file, fix by changing
      the path to "uapi".
      
      Signed-off-by: default avatarJiri Pirko <jiri@nvidia.com>
      Reviewed-by: default avatarYi Liu <yi.l.liu@intel.com>
      Link: https://lore.kernel.org/r/20230310095857.985814-1-jiri@resnulli.us
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      d7ba3657
    • Xujun Leng's avatar
      docs: process: typo fix · 42da2c00
      Xujun Leng authored
      
      
      In the second paragraph of section "Respond to review comments", there is
      a spelling mistake: "aganst" should be "against".
      
      Signed-off-by: default avatarXujun Leng <lengxujun2007@126.com>
      Link: https://lore.kernel.org/r/20230312071423.3042-1-lengxujun2007@126.com
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      42da2c00
    • Kuninori Morimoto's avatar
      ALSA: hda/ca0132: fixup buffer overrun at tuning_ctl_set() · 98e5eb11
      Kuninori Morimoto authored
      
      
      tuning_ctl_set() might have buffer overrun at (X) if it didn't break
      from loop by matching (A).
      
      	static int tuning_ctl_set(...)
      	{
      		for (i = 0; i < TUNING_CTLS_COUNT; i++)
      (A)			if (nid == ca0132_tuning_ctls[i].nid)
      				break;
      
      		snd_hda_power_up(...);
      (X)		dspio_set_param(..., ca0132_tuning_ctls[i].mid, ...);
      		snd_hda_power_down(...);                ^
      
      		return 1;
      	}
      
      We will get below error by cppcheck
      
      	sound/pci/hda/patch_ca0132.c:4229:2: note: After for loop, i has value 12
      	 for (i = 0; i < TUNING_CTLS_COUNT; i++)
      	 ^
      	sound/pci/hda/patch_ca0132.c:4234:43: note: Array index out of bounds
      	 dspio_set_param(codec, ca0132_tuning_ctls[i].mid, 0x20,
      	                                           ^
      This patch cares non match case.
      
      Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Link: https://lore.kernel.org/r/87sfe9eap7.wl-kuninori.morimoto.gx@renesas.com
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      98e5eb11
    • Kuninori Morimoto's avatar
      ALSA: asihpi: check pao in control_message() · 9026c0bf
      Kuninori Morimoto authored
      
      
      control_message() might be called with pao = NULL.
      Here indicates control_message() as sample.
      
      (B)	static void control_message(struct hpi_adapter_obj *pao, ...)
      	{                                                   ^^^
      		struct hpi_hw_obj *phw = pao->priv;
      		...                      ^^^
      	}
      
      (A)	void _HPI_6205(struct hpi_adapter_obj *pao, ...)
      	{                                      ^^^
      		...
      		case HPI_OBJ_CONTROL:
      (B)			control_message(pao, phm, phr);
      			break;          ^^^
      		...
      	}
      
      	void HPI_6205(...)
      	{
      		...
      (A)		_HPI_6205(NULL, phm, phr);
      		...       ^^^^
      	}
      
      Therefore, We will get too many warning via cppcheck, like below
      
      	sound/pci/asihpi/hpi6205.c:238:27: warning: Possible null pointer dereference: pao [nullPointer]
      		 struct hpi_hw_obj *phw = pao->priv;
      		                          ^
      	sound/pci/asihpi/hpi6205.c:433:13: note: Calling function '_HPI_6205', 1st argument 'NULL' value is 0
      		  _HPI_6205(NULL, phm, phr);
      		            ^
      	sound/pci/asihpi/hpi6205.c:401:20: note: Calling function 'control_message', 1st argument 'pao' value is 0
      	   control_message(pao, phm, phr);
      	                   ^
      Set phr->error like many functions doing, and don't call _HPI_6205()
      with NULL.
      
      Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Link: https://lore.kernel.org/r/87ttypeaqz.wl-kuninori.morimoto.gx@renesas.com
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      9026c0bf
  5. Mar 14, 2023
    • Guilherme G. Piccoli's avatar
      drm/amdgpu/vcn: Disable indirect SRAM on Vangogh broken BIOSes · 542a56e8
      Guilherme G. Piccoli authored
      The VCN firmware loading path enables the indirect SRAM mode if it's
      advertised as supported. We might have some cases of FW issues that
      prevents this mode to working properly though, ending-up in a failed
      probe. An example below, observed in the Steam Deck:
      
      [...]
      [drm] failed to load ucode VCN0_RAM(0x3A)
      [drm] psp gfx command LOAD_IP_FW(0x6) failed and response status is (0xFFFF0000)
      amdgpu 0000:04:00.0: [drm:amdgpu_ring_test_helper [amdgpu]] *ERROR* ring vcn_dec_0 test failed (-110)
      [drm:amdgpu_device_init.cold [amdgpu]] *ERROR* hw_init of IP block <vcn_v3_0> failed -110
      amdgpu 0000:04:00.0: amdgpu: amdgpu_device_ip_init failed
      amdgpu 0000:04:00.0: amdgpu: Fatal error during GPU init
      [...]
      
      Disabling the VCN block circumvents this, but it's a very invasive
      workaround that turns off the entire feature. So, let's add a quirk
      on VCN loading that checks for known problematic BIOSes on Vangogh,
      so we can proactively disable the indirect SRAM mode and allow the
      HW proper probe and VCN IP block to work fine.
      
      Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2385
      Fixes: 82132ecc
      
       ("drm/amdgpu: enable Vangogh VCN indirect sram mode")
      Cc: stable@vger.kernel.org
      Cc: James Zhu <James.Zhu@amd.com>
      Cc: Leo Liu <leo.liu@amd.com>
      Signed-off-by: default avatarGuilherme G. Piccoli <gpiccoli@igalia.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      542a56e8
    • Alex Deucher's avatar
      drm/amdgpu/nv: fix codec array for SR_IOV · 45aa07fa
      Alex Deucher authored
      Copy paste error.
      
      Fixes: 38433412
      
       ("drm/amdgpu/nv: don't expose AV1 if VCN0 is harvested")
      Reported-by: default avatarAbaci Robot <abaci@linux.alibaba.com>
      Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4454
      Cc: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
      Acked-by: default avatarGuchun Chen <guchun.chen@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      45aa07fa
    • Benjamin Cheng's avatar
      drm/amd/display: Write to correct dirty_rect · 751281c5
      Benjamin Cheng authored
      When FB_DAMAGE_CLIPS are provided in a non-MPO scenario, the loop does
      not use the counter i. This causes the fill_dc_dity_rect() to always
      fill dirty_rects[0], causing graphical artifacts when a damage clip
      aware DRM client sends more than 1 damage clip.
      
      Instead, use the flip_addrs->dirty_rect_count which is incremented by
      fill_dc_dirty_rect() on a successful fill.
      
      Fixes: 30ebe415
      
       ("drm/amd/display: add FB_DAMAGE_CLIPS support")
      Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2453
      Signed-off-by: default avatarBenjamin Cheng <ben@bcheng.me>
      Signed-off-by: default avatarHamza Mahfooz <hamza.mahfooz@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org # 6.1.x
      751281c5
    • Guchun Chen's avatar
      drm/amdgpu: move poll enabled/disable into non DC path · 3fadda5d
      Guchun Chen authored
      Some amd asics having reliable hotplug support don't call
      drm_kms_helper_poll_init in driver init sequence. However,
      due to the unified suspend/resume path for all asics, because
      the output_poll_work->func is not set for these asics, a warning
      arrives when suspending.
      
      [   90.656049]  <TASK>
      [   90.656050]  ? console_unlock+0x4d/0x100
      [   90.656053]  ? __irq_work_queue_local+0x27/0x60
      [   90.656056]  ? irq_work_queue+0x2b/0x50
      [   90.656057]  ? __wake_up_klogd+0x40/0x60
      [   90.656059]  __cancel_work_timer+0xed/0x180
      [   90.656061]  drm_kms_helper_poll_disable.cold+0x1f/0x2c [drm_kms_helper]
      [   90.656072]  amdgpu_device_suspend+0x81/0x170 [amdgpu]
      [   90.656180]  amdgpu_pmops_runtime_suspend+0xb5/0x1b0 [amdgpu]
      [   90.656269]  pci_pm_runtime_suspend+0x61/0x1b0
      
      drm_kms_helper_poll_enable/disable is valid when poll_init is called in
      amdgpu code, which is only used in non DC path. So move such codes into
      non-DC path code to get rid of such warnings.
      
      v1: introduce use_kms_poll flag in amdgpu as the poll stuff check
      v2: use dc_enabled as the flag to simply code
      v3: move code into non DC path instead of relying on any flag
      
      Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2411
      Fixes: a4e77172
      
       ("drm/probe_helper: sort out poll_running vs poll_enabled")
      Reported-by: default avatarBert Karwatzki <spasswolf@web.de>
      Suggested-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
      Suggested-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarGuchun Chen <guchun.chen@amd.com>
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      3fadda5d