1. 12 May, 2023 3 commits
  2. 11 May, 2023 31 commits
  3. 10 May, 2023 6 commits
    • Linus Torvalds's avatar
      Merge tag 'fsnotify_for_v6.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · d295b66a
      Linus Torvalds authored
      Pull inotify fix from Jan Kara:
       "A fix for possibly reporting invalid watch descriptor with inotify
        event"
      
      * tag 'fsnotify_for_v6.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        inotify: Avoid reporting event with invalid wd
      d295b66a
    • Linus Torvalds's avatar
      Merge tag 'gfs2-v6.3-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 · 2a78769d
      Linus Torvalds authored
      Pull gfs2 fix from Andreas Gruenbacher:
      
       - Fix a NULL pointer dereference when mounting corrupted filesystems
      
      * tag 'gfs2-v6.3-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2:
        gfs2: Don't deref jdesc in evict
      2a78769d
    • Bob Peterson's avatar
      gfs2: Don't deref jdesc in evict · 504a10d9
      Bob Peterson authored
      On corrupt gfs2 file systems the evict code can try to reference the
      journal descriptor structure, jdesc, after it has been freed and set to
      NULL. The sequence of events is:
      
      init_journal()
      ...
      fail_jindex:
         gfs2_jindex_free(sdp); <------frees journals, sets jdesc = NULL
            if (gfs2_holder_initialized(&ji_gh))
               gfs2_glock_dq_uninit(&ji_gh);
      fail:
         iput(sdp->sd_jindex); <--references jdesc in evict_linked_inode
            evict()
               gfs2_evict_inode()
                  evict_linked_inode()
                     ret = gfs2_trans_begin(sdp, 0, sdp->sd_jdesc->jd_blocks);
      <------references the now freed/zeroed sd_jdesc pointer.
      
      The call to gfs2_trans_begin is done because the truncate_inode_pages
      call can cause gfs2 events that require a transaction, such as removing
      journaled data (jdata) blocks from the journal.
      
      This patch fixes the problem by adding a check for sdp->sd_jdesc to
      function gfs2_evict_inode. In theory, this should only happen to corrupt
      gfs2 file systems, when gfs2 detects the problem, reports it, then tries
      to evict all the system inodes it has read in up to that point.
      Reported-by: default avatarYang Lan <lanyang0908@gmail.com>
      Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      504a10d9
    • Linus Torvalds's avatar
      Merge tag 'platform-drivers-x86-v6.4-2' of... · ad2fd53a
      Linus Torvalds authored
      Merge tag 'platform-drivers-x86-v6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
      
      Pull x86 platform driver fixes from Hans de Goede:
       "Nothing special to report just various small fixes:
      
         - thinkpad_acpi: Fix profile (performance/bal/low-power) regression
           on T490
      
         - misc other small fixes / hw-id additions"
      
      * tag 'platform-drivers-x86-v6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
        platform/mellanox: fix potential race in mlxbf-tmfifo driver
        platform/x86: touchscreen_dmi: Add info for the Dexp Ursus KX210i
        platform/x86: touchscreen_dmi: Add upside-down quirk for GDIX1002 ts on the Juno Tablet
        platform/x86: thinkpad_acpi: Add profile force ability
        platform/x86: thinkpad_acpi: Fix platform profiles on T490
        platform/x86: hp-wmi: add micmute to hp_wmi_keymap struct
        platform/x86/intel-uncore-freq: Return error on write frequency
        platform/x86: intel_scu_pcidrv: Add back PCI ID for Medfield
      ad2fd53a
    • Vitaly Prosyak's avatar
      drm/sched: Check scheduler work queue before calling timeout handling · 2da5bffe
      Vitaly Prosyak authored
      During an IGT GPU reset test we see again oops despite of
      commit 0c8c901aaaebc9 (drm/sched: Check scheduler ready before calling
      timeout handling).
      
      It uses ready condition whether to call drm_sched_fault which unwind
      the TDR leads to GPU reset.
      However it looks the ready condition is overloaded with other meanings,
      for example, for the following stack is related GPU reset :
      
      0  gfx_v9_0_cp_gfx_start
      1  gfx_v9_0_cp_gfx_resume
      2  gfx_v9_0_cp_resume
      3  gfx_v9_0_hw_init
      4  gfx_v9_0_resume
      5  amdgpu_device_ip_resume_phase2
      
      does the following:
      	/* start the ring */
      	gfx_v9_0_cp_gfx_start(adev);
      	ring->sched.ready = true;
      
      The same approach is for other ASICs as well :
      gfx_v8_0_cp_gfx_resume
      gfx_v10_0_kiq_resume, etc...
      
      As a result, our GPU reset test causes GPU fault which calls unconditionally gfx_v9_0_fault
      and then drm_sched_fault. However now it depends on whether the interrupt service routine
      drm_sched_fault is executed after gfx_v9_0_cp_gfx_start is completed which sets the ready
      field of the scheduler to true even  for uninitialized schedulers and causes oops vs
      no fault or when ISR  drm_sched_fault is completed prior  gfx_v9_0_cp_gfx_start and
      NULL pointer dereference does not occur.
      
      Use the field timeout_wq  to prevent oops for uninitialized schedulers.
      The field could be initialized by the work queue of resetting the domain.
      
      v1: Corrections to commit message (Luben)
      
      Fixes: 11b3b9f4 ("drm/sched: Check scheduler ready before calling timeout handling")
      Signed-off-by: default avatarVitaly Prosyak <vitaly.prosyak@amd.com>
      Link: https://lore.kernel.org/r/20230510135111.58631-1-vitaly.prosyak@amd.comReviewed-by: default avatarLuben Tuikov <luben.tuikov@amd.com>
      Signed-off-by: default avatarLuben Tuikov <luben.tuikov@amd.com>
      2da5bffe
    • Colin Foster's avatar
      net: mscc: ocelot: fix stat counter register values · cdc2e28e
      Colin Foster authored
      Commit d4c36765 ("net: mscc: ocelot: keep ocelot_stat_layout by reg
      address, not offset") organized the stats counters for Ocelot chips, namely
      the VSC7512 and VSC7514. A few of the counter offsets were incorrect, and
      were caught by this warning:
      
      WARNING: CPU: 0 PID: 24 at drivers/net/ethernet/mscc/ocelot_stats.c:909
      ocelot_stats_init+0x1fc/0x2d8
      reg 0x5000078 had address 0x220 but reg 0x5000079 has address 0x214,
      bulking broken!
      
      Fix these register offsets.
      
      Fixes: d4c36765 ("net: mscc: ocelot: keep ocelot_stat_layout by reg address, not offset")
      Signed-off-by: default avatarColin Foster <colin.foster@in-advantage.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cdc2e28e