1. 15 Apr, 2022 15 commits
  2. 14 Apr, 2022 25 commits
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2022-04-15' of git://anongit.freedesktop.org/drm/drm · 028192fe
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Eggs season holidays are among us, and I think I'd expect some smaller
        pulls for two weeks then.
      
        This seems eerily quiet. One i915 fix, amdgpu has a bunch and msm. I
        didn't see a misc pull this week, so I expect that will catch up next
        week.
      
        i915:
         - Correct legacy mmap disabling to use GRAPHICS_VER_FULL
      
        msm:
         - system suspend fix
         - kzalloc return checks
         - misc display fix
         - iommu_present removal
      
        amdgpu:
         - Fix for alpha properly in pre-multiplied mode
         - Fix VCN 3.1.2 firmware name
         - Suspend/resume fix
         - Add a gfxoff quirk for Mac vega20 board
         - DCN 3.1.6 spread spectrum fix"
      
      * tag 'drm-fixes-2022-04-15' of git://anongit.freedesktop.org/drm/drm:
        drm/amd/display: remove dtbclk_ss compensation for dcn316
        drm/amdgpu: Enable gfxoff quirk on MacBook Pro
        drm/amdgpu: Ensure HDA function is suspended before ASIC reset
        drm/amdgpu: fix VCN 3.1.2 firmware name
        drm/amd/display: don't ignore alpha property on pre-multiplied mode
        drm/msm/gpu: Avoid -Wunused-function with !CONFIG_PM_SLEEP
        drm/msm/dp: add fail safe mode outside of event_mutex context
        drm/msm/dsi: Use connector directly in msm_dsi_manager_connector_init()
        drm/msm: Stop using iommu_present()
        drm/msm/mdp5: check the return of kzalloc()
        drm/msm: Fix range size vs end confusion
        drm/i915: Sunset igpu legacy mmap support based on GRAPHICS_VER_FULL
        drm/msm/dpu: Use indexed array initializer to prevent mismatches
        drm/msm/disp: check the return value of kzalloc()
        dt-bindings: display/msm: another fix for the dpu-qcm2290 example
        drm/msm: Add missing put_task_struct() in debugfs path
        drm/msm/gpu: Remove mutex from wait_event condition
        drm/msm/gpu: Park scheduler threads for system suspend
        drm/msm/gpu: Rename runtime suspend/resume functions
      028192fe
    • Linus Torvalds's avatar
      Merge tag 'vfio-v5.18-rc3' of https://github.com/awilliam/linux-vfio · 38a5e3fb
      Linus Torvalds authored
      Pull vfio fix from Alex Williamson:
      
       - Fix VF token checking for vfio-pci variant drivers (Jason Gunthorpe)
      
      * tag 'vfio-v5.18-rc3' of https://github.com/awilliam/linux-vfio:
        vfio/pci: Fix vf_token mechanism when device-specific VF drivers are used
      38a5e3fb
    • Linus Torvalds's avatar
      Merge tag '5.18-rc2-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 · 62345e48
      Linus Torvalds authored
      Pull cifs fixes from Steve French:
      
       - two fixes related to unmount
      
       - symlink overflow fix
      
       - minor netfs fix
      
       - improved tracing for crediting (flow control)
      
      * tag '5.18-rc2-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: verify that tcon is valid before dereference in cifs_kill_sb
        cifs: potential buffer overflow in handling symlinks
        cifs: Split the smb3_add_credits tracepoint
        cifs: release cached dentries only if mount is complete
        cifs: Check the IOCB_DIRECT flag, not O_DIRECT
      62345e48
    • NeilBrown's avatar
      VFS: filename_create(): fix incorrect intent. · b3d4650d
      NeilBrown authored
      When asked to create a path ending '/', but which is not to be a
      directory (LOOKUP_DIRECTORY not set), filename_create() will never try
      to create the file.  If it doesn't exist, -ENOENT is reported.
      
      However, it still passes LOOKUP_CREATE|LOOKUP_EXCL to the filesystems
      ->lookup() function, even though there is no intent to create.  This is
      misleading and can cause incorrect behaviour.
      
      If you try
      
         ln -s foo /path/dir/
      
      where 'dir' is a directory on an NFS filesystem which is not currently
      known in the dcache, this will fail with ENOENT.
      
      But as the name is not in the dcache, nfs_lookup gets called with
      LOOKUP_CREATE|LOOKUP_EXCL and so it returns NULL without performing any
      lookup, with the expectation that a subsequent call to create the target
      will be made, and the lookup can be combined with the creation.  In the
      case with a trailing '/' and no LOOKUP_DIRECTORY, that call is never
      made.  Instead filename_create() sees that the dentry is not (yet)
      positive and returns -ENOENT - even though the directory actually
      exists.
      
      So only set LOOKUP_CREATE|LOOKUP_EXCL if there really is an intent to
      create, and use the absence of these flags to decide if -ENOENT should
      be returned.
      
      Note that filename_parentat() is only interested in LOOKUP_REVAL, so we
      split that out and store it in 'reval_flag'.  __lookup_hash() then gets
      reval_flag combined with whatever create flags were determined to be
      needed.
      Reviewed-by: default avatarDavid Disseldorp <ddiss@suse.de>
      Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
      Signed-off-by: default avatarNeilBrown <neilb@suse.de>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b3d4650d
    • Dave Airlie's avatar
      Merge tag 'amd-drm-fixes-5.18-2022-04-13' of... · 8e401ff5
      Dave Airlie authored
      Merge tag 'amd-drm-fixes-5.18-2022-04-13' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes
      
      amd-drm-fixes-5.18-2022-04-13:
      
      amdgpu:
      - Fix for alpha properly in pre-multiplied mode
      - Fix VCN 3.1.2 firmware name
      - Suspend/resume fix
      - Add a gfxoff quirk for Mac vega20 board
      - DCN 3.1.6 spread spectrum fix
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Alex Deucher <alexander.deucher@amd.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220414025821.5811-1-alexander.deucher@amd.com
      8e401ff5
    • Linus Torvalds's avatar
      Merge tag 's390-5.18-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 115acbb5
      Linus Torvalds authored
      Pull s390 fixes from Heiko Carstens:
      
       - Convert current_stack_pointer to a register alias like it is assumed
         if ARCH_HAS_CURRENT_STACK_POINTER is selected. The existing
         implementation as a function breaks CONFIG_HARDENED_USERCOPY
         sanity-checks
      
       - Get rid of -Warray-bounds warning within kexec code
      
       - Add minimal IBM z16 support by reporting a proper elf platform, and
         adding compile options
      
       - Update defconfigs
      
      * tag 's390-5.18-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390: enable CONFIG_HARDENED_USERCOPY in debug_defconfig
        s390: current_stack_pointer shouldn't be a function
        s390: update defconfigs
        s390/kexec: silence -Warray-bounds warning
        s390: allow to compile with z16 optimizations
        s390: add z16 elf platform
      115acbb5
    • Linus Torvalds's avatar
      Merge tag 'net-5.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · d20339fa
      Linus Torvalds authored
      Pull networking fixes from Paolo Abeni:
       "Including fixes from wireless and netfilter.
      
        Current release - regressions:
      
         - smc: fix af_ops of child socket pointing to released memory
      
         - wifi: ath9k: fix usage of driver-private space in tx_info
      
        Previous releases - regressions:
      
         - ipv6: fix panic when forwarding a pkt with no in6 dev
      
         - sctp: use the correct skb for security_sctp_assoc_request
      
         - smc: fix NULL pointer dereference in smc_pnet_find_ib()
      
         - sched: fix initialization order when updating chain 0 head
      
         - phy: don't defer probe forever if PHY IRQ provider is missing
      
         - dsa: revert "net: dsa: setup master before ports"
      
         - dsa: felix: fix tagging protocol changes with multiple CPU ports
      
         - eth: ice:
            - fix use-after-free when freeing @rx_cpu_rmap
            - revert "iavf: fix deadlock occurrence during resetting VF
              interface"
      
         - eth: lan966x: stop processing the MAC entry is port is wrong
      
        Previous releases - always broken:
      
         - sched:
            - flower: fix parsing of ethertype following VLAN header
            - taprio: check if socket flags are valid
      
         - nfc: add flush_workqueue to prevent uaf
      
         - veth: ensure eth header is in skb's linear part
      
         - eth: stmmac: fix altr_tse_pcs function when using a fixed-link
      
         - eth: macb: restart tx only if queue pointer is lagging
      
         - eth: macvlan: fix leaking skb in source mode with nodst option"
      
      * tag 'net-5.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (52 commits)
        net: bcmgenet: Revert "Use stronger register read/writes to assure ordering"
        rtnetlink: Fix handling of disabled L3 stats in RTM_GETSTATS replies
        net: dsa: felix: fix tagging protocol changes with multiple CPU ports
        tun: annotate access to queue->trans_start
        nfc: nci: add flush_workqueue to prevent uaf
        net: dsa: realtek: don't parse compatible string for RTL8366S
        net: dsa: realtek: fix Kconfig to assure consistent driver linkage
        net: ftgmac100: access hardware register after clock ready
        Revert "net: dsa: setup master before ports"
        macvlan: Fix leaking skb in source mode with nodst option
        netfilter: nf_tables: nft_parse_register can return a negative value
        net: lan966x: Stop processing the MAC entry is port is wrong.
        net: lan966x: Fix when a port's upper is changed.
        net: lan966x: Fix IGMP snooping when frames have vlan tag
        net: lan966x: Update lan966x_ptp_get_nominal_value
        sctp: Initialize daddr on peeled off socket
        net/smc: Fix af_ops of child socket pointing to released memory
        net/smc: Fix NULL pointer dereference in smc_pnet_find_ib()
        net/smc: use memcpy instead of snprintf to avoid out of bounds read
        net: macb: Restart tx only if queue pointer is lagging
        ...
      d20339fa
    • Linus Torvalds's avatar
      Merge tag 'sound-5.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · b9b4c79e
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "This became an unexpectedly large pull request due to various
        regression fixes in the previous kernels.
      
        The majority of fixes are a series of patches to address the
        regression at probe errors in devres'ed drivers, while there are yet
        more fixes for the x86 SG allocations and for USB-audio buffer
        management. In addition, a few HD-audio quirks and other small fixes
        are found"
      
      * tag 'sound-5.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (52 commits)
        ALSA: usb-audio: Limit max buffer and period sizes per time
        ALSA: memalloc: Add fallback SG-buffer allocations for x86
        ALSA: nm256: Don't call card private_free at probe error path
        ALSA: mtpav: Don't call card private_free at probe error path
        ALSA: rme9652: Fix the missing snd_card_free() call at probe error
        ALSA: hdspm: Fix the missing snd_card_free() call at probe error
        ALSA: hdsp: Fix the missing snd_card_free() call at probe error
        ALSA: oxygen: Fix the missing snd_card_free() call at probe error
        ALSA: lx6464es: Fix the missing snd_card_free() call at probe error
        ALSA: cmipci: Fix the missing snd_card_free() call at probe error
        ALSA: aw2: Fix the missing snd_card_free() call at probe error
        ALSA: als300: Fix the missing snd_card_free() call at probe error
        ALSA: lola: Fix the missing snd_card_free() call at probe error
        ALSA: bt87x: Fix the missing snd_card_free() call at probe error
        ALSA: sis7019: Fix the missing error handling
        ALSA: intel_hdmi: Fix the missing snd_card_free() call at probe error
        ALSA: via82xx: Fix the missing snd_card_free() call at probe error
        ALSA: sonicvibes: Fix the missing snd_card_free() call at probe error
        ALSA: rme96: Fix the missing snd_card_free() call at probe error
        ALSA: rme32: Fix the missing snd_card_free() call at probe error
        ...
      b9b4c79e
    • Linus Torvalds's avatar
      Merge tag 'for-5.18-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · 722985e2
      Linus Torvalds authored
      Pull btrfs fixes from David Sterba:
       "A few more code and warning fixes.
      
        There's one feature ioctl removal patch slated for 5.18 that did not
        make it to the main pull request. It's just a one-liner and the ioctl
        has a v2 that's in use for a long time, no point to postpone it to
        5.19.
      
        Late update:
      
         - remove balance v1 ioctl, superseded by v2 in 2012
      
        Fixes:
      
         - add back cgroup attribution for compressed writes
      
         - add super block write start/end annotations to asynchronous balance
      
         - fix root reference count on an error handling path
      
         - in zoned mode, activate zone at the chunk allocation time to avoid
           ENOSPC due to timing issues
      
         - fix delayed allocation accounting for direct IO
      
        Warning fixes:
      
         - simplify assertion condition in zoned check
      
         - remove an unused variable"
      
      * tag 'for-5.18-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: fix btrfs_submit_compressed_write cgroup attribution
        btrfs: fix root ref counts in error handling in btrfs_get_root_ref
        btrfs: zoned: activate block group only for extent allocation
        btrfs: return allocated block group from do_chunk_alloc()
        btrfs: mark resumed async balance as writing
        btrfs: remove support of balance v1 ioctl
        btrfs: release correct delalloc amount in direct IO write path
        btrfs: remove unused variable in btrfs_{start,write}_dirty_block_groups()
        btrfs: zoned: remove redundant condition in btrfs_run_delalloc_range
      722985e2
    • Linus Torvalds's avatar
      Merge tag 'fscache-fixes-20220413' of... · ec9c57a7
      Linus Torvalds authored
      Merge tag 'fscache-fixes-20220413' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs
      
      Pull fscache fixes from David Howells:
       "Here's a collection of fscache and cachefiles fixes and misc small
        cleanups. The two main fixes are:
      
         - Add a missing unmark of the inode in-use mark in an error path.
      
         - Fix a KASAN slab-out-of-bounds error when setting the xattr on a
           cachefiles volume due to the wrong length being given to memcpy().
      
        In addition, there's the removal of an unused parameter, removal of an
        unused Kconfig option, conditionalising a bit of procfs-related stuff
        and some doc fixes"
      
      * tag 'fscache-fixes-20220413' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs:
        fscache: remove FSCACHE_OLD_API Kconfig option
        fscache: Use wrapper fscache_set_cache_state() directly when relinquishing
        fscache: Move fscache_cookies_seq_ops specific code under CONFIG_PROC_FS
        fscache: Remove the cookie parameter from fscache_clear_page_bits()
        docs: filesystems: caching/backend-api.rst: fix an object withdrawn API
        docs: filesystems: caching/backend-api.rst: correct two relinquish APIs use
        cachefiles: Fix KASAN slab-out-of-bounds in cachefiles_set_volume_xattr
        cachefiles: unmark inode in use in error path
      ec9c57a7
    • Ming Lei's avatar
      block: null_blk: end timed out poll request · 3e3876d3
      Ming Lei authored
      When poll request is timed out, it is removed from the poll list,
      but not completed, so the request is leaked, and never get chance
      to complete.
      
      Fix the issue by ending it in timeout handler.
      
      Fixes: 0a593fbb ("null_blk: poll queue support")
      Signed-off-by: default avatarMing Lei <ming.lei@redhat.com>
      Link: https://lore.kernel.org/r/20220413084836.1571995-1-ming.lei@redhat.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
      3e3876d3
    • Ming Lei's avatar
      block: fix offset/size check in bio_trim() · 8535c018
      Ming Lei authored
      Unit of bio->bi_iter.bi_size is bytes, but unit of offset/size
      is sector.
      
      Fix the above issue in checking offset/size in bio_trim().
      
      Fixes: e83502ca ("block: fix argument type of bio_trim()")
      Cc: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
      Signed-off-by: default avatarMing Lei <ming.lei@redhat.com>
      Link: https://lore.kernel.org/r/20220414084443.1736850-1-ming.lei@redhat.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
      8535c018
    • Athira Rajeev's avatar
      perf bench: Fix numa bench to fix usage of affinity for machines with #CPUs > 1K · f58faed7
      Athira Rajeev authored
      The 'perf bench numa' testcase fails on systems with more than 1K CPUs.
      
      Testcase: perf bench numa mem -p 1 -t 3 -P 512 -s 100 -zZ0qcm --thp  1
      
      Snippet of code:
      
        <<>>
        perf: bench/numa.c:302: bind_to_node: Assertion `!(ret)' failed.
        Aborted (core dumped)
        <<>>
      
      bind_to_node() uses "sched_getaffinity" to save the original cpumask and
      this call is returning EINVAL ((invalid argument).
      
      This happens because the default mask size in glibc is 1024.  To
      overcome this 1024 CPUs mask size limitation of cpu_set_t, change the
      mask size using the CPU_*_S macros ie, use CPU_ALLOC to allocate
      cpumask, CPU_ALLOC_SIZE for size.
      
      Apart from fixing this for "orig_mask", apply same logic to "mask" as
      well which is used to setaffinity so that mask size is large enough to
      represent number of possible CPU's in the system.
      
      sched_getaffinity is used in one more place in perf numa bench. It is in
      "bind_to_cpu" function. Apply the same logic there also. Though
      currently no failure is reported from there, it is ideal to change
      getaffinity to work with such system configurations having CPU's more
      than default mask size supported by glibc.
      
      Also fix "sched_setaffinity" to use mask size which is large enough to
      represent number of possible CPU's in the system.
      
      Fixed all places where "bind_cpumask" which is part of "struct
      thread_data" is used such that bind_cpumask works in all configuration.
      Reported-by: default avatarDisha Goel <disgoel@linux.vnet.ibm.com>
      Signed-off-by: default avatarAthira Jajeev <atrajeev@linux.vnet.ibm.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Nageswara R Sastry <rnsastry@linux.ibm.com>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: linuxppc-dev@lists.ozlabs.org
      Link: https://lore.kernel.org/r/20220412164059.42654-3-atrajeev@linux.vnet.ibm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f58faed7
    • Athira Rajeev's avatar
      perf bench: Fix numa testcase to check if CPU used to bind task is online · 8cb7a188
      Athira Rajeev authored
      Perf numa bench test fails with error:
      
      Testcase:
      
        ./perf bench numa mem -p 2 -t 1 -P 1024 -C 0,8 -M 1,0 -s 20 -zZq --thp  1 --no-data_rand_walk
      
      Failure snippet:
      
      <<>>
        Running 'numa/mem' benchmark:
      
        # Running main, "perf bench numa numa-mem -p 2 -t 1 -P 1024 -C 0,8 -M 1,0 -s 20 -zZq --thp 1 --no-data_rand_walk"
      
        perf: bench/numa.c:333: bind_to_cpumask: Assertion `!(ret)' failed.
      <<>>
      
      The Testcases uses CPU's 0 and 8. In function "parse_setup_cpu_list",
      There is check to see if cpu number is greater than max cpu's possible
      in the system ie via "if (bind_cpu_0 >= g->p.nr_cpus || bind_cpu_1 >=
      g->p.nr_cpus) {".
      
      But it could happen that system has say 48 CPU's, but only number of
      online CPU's is 0-7. Other CPU's are offlined. Since "g->p.nr_cpus" is
      48, so function will go ahead and set bit for CPU 8 also in cpumask (
      td->bind_cpumask).
      
      bind_to_cpumask function is called to set affinity using
      sched_setaffinity and the cpumask. Since the CPU8 is not present, set
      affinity will fail here with EINVAL.
      
      Fix this issue by adding a check to make sure that, CPU's provided in
      the input argument values are online before proceeding further and skip
      the test. For this, include new helper function "is_cpu_online" in
      "tools/perf/util/header.c".
      
      Since "BIT(x)" definition will get included from header.h, remove
      that from bench/numa.c
      Reported-by: default avatarDisha Goel <disgoel@linux.vnet.ibm.com>
      Signed-off-by: default avatarAthira Jajeev <atrajeev@linux.vnet.ibm.com>
      Tested-by: default avatarDisha Goel <disgoel@linux.vnet.ibm.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Nageswara R Sastry <rnsastry@linux.ibm.com>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: linuxppc-dev@lists.ozlabs.org
      Link: https://lore.kernel.org/r/20220412164059.42654-2-atrajeev@linux.vnet.ibm.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      8cb7a188
    • Alexey Bayduraev's avatar
      perf record: Fix per-thread option · 23380e4d
      Alexey Bayduraev authored
      Per-thread mode doesn't have specific CPUs for events, add checks for
      this case.
      
      Minor fix to a pr_debug by Ian Rogers <irogers@google.com> to avoid an
      out of bound array access.
      
      Fixes: 7954f716 ("perf record: Introduce thread affinity and mmap masks")
      Reported-by: default avatarIan Rogers <irogers@google.com>
      Signed-off-by: default avatarAlexey Bayduraev <alexey.bayduraev@gmail.com>
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Alexey Bayduraev <alexey.v.bayduraev@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Riccardo Mancini <rickyman7@gmail.com>
      Cc: Stephane Eranian <eranian@google.com>
      Link: https://lore.kernel.org/r/20220414014642.3308206-1-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      23380e4d
    • Jeremy Linton's avatar
      net: bcmgenet: Revert "Use stronger register read/writes to assure ordering" · 2df3fc4a
      Jeremy Linton authored
      It turns out after digging deeper into this bug, that it was being
      triggered by GCC12 failing to call the bcmgenet_enable_dma()
      routine. Given that a gcc12 fix has been merged [1] and the genet
      driver now works properly when built with gcc12, this commit should
      be reverted.
      
      [1]
      https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105160
      https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=aabb9a261ef060cf24fd626713f1d7d9df81aa57
      
      Fixes: 8d3ea3d4 ("net: bcmgenet: Use stronger register read/writes to assure ordering")
      Signed-off-by: default avatarJeremy Linton <jeremy.linton@arm.com>
      Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Link: https://lore.kernel.org/r/20220412210420.1129430-1-jeremy.linton@arm.comSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      2df3fc4a
    • Petr Machata's avatar
      rtnetlink: Fix handling of disabled L3 stats in RTM_GETSTATS replies · 23cfe941
      Petr Machata authored
      When L3 stats are disabled, rtnl_offload_xstats_get_size_stats() returns
      size of 0, which is supposed to be an indication that the corresponding
      attribute should not be emitted. However, instead, the current code
      reserves a 0-byte attribute.
      
      The reason this does not show up as a citation on a kasan kernel is that
      netdev_offload_xstats_get(), which is supposed to fill in the data, never
      ends up getting called, because rtnl_offload_xstats_get_stats() notices
      that the stats are not actually used and skips the call.
      
      Thus a zero-length IFLA_OFFLOAD_XSTATS_L3_STATS attribute ends up in a
      response, confusing the userspace.
      
      Fix by skipping the L3-stats related block in rtnl_offload_xstats_fill().
      
      Fixes: 0e7788fd ("net: rtnetlink: Add UAPI for obtaining L3 offload xstats")
      Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Link: https://lore.kernel.org/r/591b58e7623edc3eb66dd1fcfa8c8f133d090974.1649794741.git.petrm@nvidia.comSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      23cfe941
    • Vladimir Oltean's avatar
      net: dsa: felix: fix tagging protocol changes with multiple CPU ports · 00fa91bc
      Vladimir Oltean authored
      When the device tree has 2 CPU ports defined, a single one is active
      (has any dp->cpu_dp pointers point to it). Yet the second one is still a
      CPU port, and DSA still calls ->change_tag_protocol on it.
      
      On the NXP LS1028A, the CPU ports are ports 4 and 5. Port 4 is the
      active CPU port and port 5 is inactive.
      
      After the following commands:
      
       # Initial setting
       cat /sys/class/net/eno2/dsa/tagging
       ocelot
       echo ocelot-8021q > /sys/class/net/eno2/dsa/tagging
       echo ocelot > /sys/class/net/eno2/dsa/tagging
      
      traffic is now broken, because the driver has moved the NPI port from
      port 4 to port 5, unbeknown to DSA.
      
      The problem can be avoided by detecting that the second CPU port is
      unused, and not doing anything for it. Further rework will be needed
      when proper support for multiple CPU ports is added.
      
      Treat this as a bug and prepare current kernels to work in single-CPU
      mode with multiple-CPU DT blobs.
      
      Fixes: adb3dccf ("net: dsa: felix: convert to the new .change_tag_protocol DSA API")
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Link: https://lore.kernel.org/r/20220412172209.2531865-1-vladimir.oltean@nxp.comSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      00fa91bc
    • Antoine Tenart's avatar
      tun: annotate access to queue->trans_start · 968a1a5d
      Antoine Tenart authored
      Commit 5337824f ("net: annotate accesses to queue->trans_start")
      introduced a new helper, txq_trans_cond_update, to update
      queue->trans_start using WRITE_ONCE. One snippet in drivers/net/tun.c
      was missed, as it was introduced roughly at the same time.
      
      Fixes: 5337824f ("net: annotate accesses to queue->trans_start")
      Cc: Eric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarAntoine Tenart <atenart@kernel.org>
      Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
      Link: https://lore.kernel.org/r/20220412135852.466386-1-atenart@kernel.orgSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      968a1a5d
    • Ronnie Sahlberg's avatar
      cifs: verify that tcon is valid before dereference in cifs_kill_sb · 8b6c5845
      Ronnie Sahlberg authored
      On umount, cifs_sb->tlink_tree might contain entries that do not represent
      a valid tcon.
      Check the tcon for error before we dereference it.
      Signed-off-by: default avatarRonnie Sahlberg <lsahlber@redhat.com>
      Cc: stable@vger.kernel.org
      Reviewed-by: default avatarShyam Prasad N <sprasad@microsoft.com>
      Reported-by: default avatarXiaoli Feng <xifeng@redhat.com>
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      8b6c5845
    • Dave Airlie's avatar
      Merge tag 'drm-msm-fixes-2022-04-13' of https://gitlab.freedesktop.org/drm/msm into drm-fixes · 98a71d12
      Dave Airlie authored
      Some msm fixes for v5.18.
      
      kzalloc return checks, display fix, misc locking and scheduler bug, iommu present removal.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Rob Clark <robdclark@gmail.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGvuTwx09MKwK68KWXqi4o7LxDGMUz1=Z7xOS+i=OV84Ug@mail.gmail.com
      98a71d12
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2022-04-13' of... · 16e04007
      Dave Airlie authored
      Merge tag 'drm-intel-fixes-2022-04-13' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
      
      - Correct legacy mmap disabling to use GRAPHICS_VER_FULL
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/YlZma8iA20iakK62@jlahtine-mobl.ger.corp.intel.com
      16e04007
    • Charlene Liu's avatar
      drm/amd/display: remove dtbclk_ss compensation for dcn316 · aadaeca4
      Charlene Liu authored
      [why]
      dcn316's dtbclk is from non_ss clock source.
      no compensation required here.
      Reviewed-by: default avatarChris Park <Chris.Park@amd.com>
      Acked-by: default avatarPavle Kotarac <Pavle.Kotarac@amd.com>
      Signed-off-by: default avatarCharlene Liu <Charlene.Liu@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      aadaeca4
    • Tomasz Moń's avatar
      drm/amdgpu: Enable gfxoff quirk on MacBook Pro · 4593c1b6
      Tomasz Moń authored
      Enabling gfxoff quirk results in perfectly usable graphical user
      interface on MacBook Pro (15-inch, 2019) with Radeon Pro Vega 20 4 GB.
      
      Without the quirk, X server is completely unusable as every few seconds
      there is gpu reset due to ring gfx timeout.
      Signed-off-by: default avatarTomasz Moń <desowin@gmail.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      4593c1b6
    • Kai-Heng Feng's avatar
      drm/amdgpu: Ensure HDA function is suspended before ASIC reset · 887f75cf
      Kai-Heng Feng authored
      DP/HDMI audio on AMD PRO VII stops working after S3:
      [  149.450391] amdgpu 0000:63:00.0: amdgpu: MODE1 reset
      [  149.450395] amdgpu 0000:63:00.0: amdgpu: GPU mode1 reset
      [  149.450494] amdgpu 0000:63:00.0: amdgpu: GPU psp mode1 reset
      [  149.983693] snd_hda_intel 0000:63:00.1: refused to change power state from D0 to D3hot
      [  150.003439] amdgpu 0000:63:00.0: refused to change power state from D0 to D3hot
      ...
      [  155.432975] snd_hda_intel 0000:63:00.1: CORB reset timeout#2, CORBRP = 65535
      
      The offending commit is daf8de08 ("drm/amdgpu: always reset the asic in
      suspend (v2)"). Commit 34452ac3 ("drm/amdgpu: don't use BACO for
      reset in S3 ") doesn't help, so the issue is something different.
      
      Assuming that to make HDA resume to D0 fully realized, it needs to be
      successfully put to D3 first. And this guesswork proves working, by
      moving amdgpu_asic_reset() to noirq callback, so it's called after HDA
      function is in D3.
      
      Fixes: daf8de08 ("drm/amdgpu: always reset the asic in suspend (v2)")
      Signed-off-by: default avatarKai-Heng Feng <kai.heng.feng@canonical.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      887f75cf