1. 29 4月, 2022 25 次提交
    • C
      mm: rework calculation of bdi_min_ratio in bdi_set_min_ratio · 21f0dd88
      Chen Wandun 提交于
      In function bdi_set_min_ratio, min_ratio is unsigned int, it will
      result underflow when setting min_ratio below bdi->min_ratio, it
      is confusing. Rework it, no functional change.
      
      Link: https://lkml.kernel.org/r/20220422095159.2858305-1-chenwandun@huawei.comSigned-off-by: NChen Wandun <chenwandun@huawei.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      21f0dd88
    • Y
      tools/vm/page_owner_sort.c: avoid repeated judgments · c7c4ab85
      Yixuan Cao 提交于
      I noticed a detail that needs to be adjusted.  When judging whether a page
      is allocated by vmalloc, the value of the variable "tmp" was repeatedly
      judged, so the code was adjusted.
      
      This work is coauthored by Yinan Zhang, Jiajian Ye, Shenghong Han, Chongxi
      Zhao, Yuhong Feng and Yongqiang Liu.
      
      Link: https://lkml.kernel.org/r/20220414042744.13896-1-caoyixuan2019@email.szu.edu.cnSigned-off-by: NYixuan Cao <caoyixuan2019@email.szu.edu.cn>
      Cc: Chongxi Zhao <zhaochongxi2019@email.szu.edu.cn>
      Cc: Haowen Bai <baihaowen@meizu.com>
      Cc: Jiajian Ye <yejiajian2018@email.szu.edu.cn>
      Cc: Sean Anderson <seanga2@gmail.com>
      Cc: Shenghong Han <hanshenghong2019@email.szu.edu.cn>
      Cc: Yinan Zhang <zhangyinan2019@email.szu.edu.cn>
      Cc: Yongqiang Liu <liuyongqiang13@huawei.com>
      Cc: Yuhong Feng <yuhongf@szu.edu.cn>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      c7c4ab85
    • Y
      tools/vm/page_owner_sort.c: provide allocator labelling and update --cull and --sort options · f09654bb
      Yixuan Cao 提交于
      An application is suspected of having memory leak when its memory
      consumption is high and keeps increasing.  There are several commonly used
      memory allocators: slab, cma, vmalloc, etc.  The memory leak
      identification can be sped up if the page information allocated by an
      allocator can be analyzed separately.
      
      This patch provides supports for memory allocator labelling for slab,
      vmalloc, and cma.  The pages allocated by slab and cma can be confirmed
      from the "PFN" line according to the kernel codes, and the label of the
      vmalloc allocator can be obtained by analyzing the stack trace.  Thanks
      for Vlastimil Babka's constructive suggestions.
      
      Based on Yinan Zhang's study, the call chain of vmalloc() is vmalloc() ->
      ...  -> __vmalloc_node_range() -> __vmalloc_area_node(). 
      __vmalloc_area_node() requests memory through the interface of buddy
      allocation system.  In the current version, __vmalloc_area_node() uses
      four interfaces: alloc_pages_bulk_array_mempolicy(),
      alloc_pages_bulk_array_node(), alloc_pages() and alloc_pages_node().  By
      disassembling the code, we find that __vmalloc_area_node() is expanded in
      __vmalloc_node_range().  So __vmalloc_area_node is not in the stack trace.
      
      On the test machine, the stack trace of pages allocated by vmalloc has the
      following four forms:
      
      __alloc_pages_bulk+0x230/0x6a0
      __vmalloc_node_range+0x19c/0x598
      
      alloc_pages_bulk_array_mempolicy+0xbc/0x278
      __vmalloc_node_range+0x1e8/0x598
      
      __alloc_pages+0x160/0x2b0
      __vmalloc_node_range+0x234/0x598
      
      alloc_pages+0xac/0x150
      __vmalloc_node_range+0x44c/0x598
      
      Therefore, in two consecutive lines of stacktrace, if the first line
      contains the word "alloc_pages" and the second line contains the word
      "__vmalloc_node_range", it can be determined that the page is allocated by
      vmalloc.  And the function offset and size are not the same on different
      machines, so there is no need to match them.
      
      At the same time, this patch updates the --cull and --sort options to
      support allocator-based merge statistics and sorting.  The added functions
      are fully compatible with the original work.  When using, you can use
      "allocator", or abbreviated as "ator".  Relevant updates have also been
      made in the documentation(Documentation/vm/page_owner.rst).
      
      Example:
      ./page_owner_sort <input> <output> --cull=st,pid,name,allocator
      ./page_owner_sort <input> <output> --sort=ator,pid,name
      
      This work is coauthored by Jiajian Ye, Yinan Zhang, Shenghong Han,
      Chongxi Zhao, Yuhong Feng and Yongqiang Liu.
      
      Link: https://lkml.kernel.org/r/20220410132932.9402-1-caoyixuan2019@email.szu.edu.cnSigned-off-by: NYixuan Cao <caoyixuan2019@email.szu.edu.cn>
      Cc: Chongxi Zhao <zhaochongxi2019@email.szu.edu.cn>
      Cc: Haowen Bai <baihaowen@meizu.com>
      Cc: Jiajian Ye <yejiajian2018@email.szu.edu.cn>
      Cc: Sean Anderson <seanga2@gmail.com>
      Cc: Shenghong Han <hanshenghong2019@email.szu.edu.cn>
      Cc: Yinan Zhang <zhangyinan2019@email.szu.edu.cn>
      Cc: Yongqiang Liu <liuyongqiang13@huawei.com>
      Cc: Yuhong Feng <yuhongf@szu.edu.cn>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      f09654bb
    • H
      tools/vm/page_owner: support debug log to avoid huge log print · a72469aa
      Haowen Bai 提交于
      As normal usage, tool will print huge parser log and spend a lot of time
      printing, so it would be preferable add "-d" debug control to avoid this
      problem.
      
      Link: https://lkml.kernel.org/r/1649672446-5685-1-git-send-email-baihaowen@meizu.comSigned-off-by: NHaowen Bai <baihaowen@meizu.com>
      Cc: Chongxi Zhao <zhaochongxi2019@email.szu.edu.cn>
      Cc: Jiajian Ye <yejiajian2018@email.szu.edu.cn>
      Cc: Shenghong Han <hanshenghong2019@email.szu.edu.cn>
      Cc: Yinan Zhang <zhangyinan2019@email.szu.edu.cn>
      Cc: Yixuan Cao <caoyixuan2019@email.szu.edu.cn>
      Cc: Yongqiang Liu <liuyongqiang13@huawei.com>
      Cc: Yuhong Feng <yuhongf@szu.edu.cn>
      Cc: Sean Anderson <seanga2@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      a72469aa
    • J
      tools/vm/page_owner_sort.c: support sorting blocks by multiple keys · ebbeae36
      Jiajian Ye 提交于
      When viewing page owner information, we may want to sort blocks of
      information by multiple keys, since one single key does not uniquely
      identify a block. Therefore, following adjustments are made:
      
      1. Add a new --sort option to support sorting blocks of information by
      multiple keys.
      
      	./page_owner_sort <input> <output> --sort=<order>
      	./page_owner_sort <input> <output> --sort <order>
      
      <order> is a single argument in the form of a comma-separated list,
      which offers a way to specify sorting order.
      
      Sorting syntax is [+|-]key[,[+|-]key[,...]]. The ascending or descending
      order can be specified by adding the + (ascending, default) or - (descend
      -ing) prefix to the key:
      
      	./page_owner_sort <input> <output> [option] --sort -key1,+key2,key3...
      
      For example, to sort the blocks first by task command name in lexicographic
      order and then by pid in ascending numerical order, use the following:
      
      	./page_owner_sort <input> <output> --sort=name,+pid
      
      To sort the blocks first by pid in ascending order and then by timestamp
      of the page when it is allocated in descending order, use the following:
      
      	./page_owner_sort <input> <output> --sort=pid,-alloc_ts
      
      2. Add explanations of a newly added --sort option in the function usage()
      and the document(Documentation/vm/page_owner.rst).
      
      This work is coauthored by
      	Yixuan Cao
      	Shenghong Han
      	Yinan Zhang
      	Chongxi Zhao
      	Yuhong Feng
      	Yongqiang Liu
      
      Link: https://lkml.kernel.org/r/20220401024856.767-3-yejiajian2018@email.szu.edu.cnSigned-off-by: NJiajian Ye <yejiajian2018@email.szu.edu.cn>
      Cc: Chongxi Zhao <zhaochongxi2019@email.szu.edu.cn>
      Cc: Shenghong Han <hanshenghong2019@email.szu.edu.cn>
      Cc: Yinan Zhang <zhangyinan2019@email.szu.edu.cn>
      Cc: Yixuan Cao <caoyixuan2019@email.szu.edu.cn>
      Cc: Yongqiang Liu <liuyongqiang13@huawei.com>
      Cc: Yuhong Feng <yuhongf@szu.edu.cn>
      Cc: Haowen Bai <baihaowen@meizu.com>
      Cc: Sean Anderson <seanga2@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      ebbeae36
    • J
      tools/vm/page_owner_sort.c: support for multi-value selection in single argument · 75382a2d
      Jiajian Ye 提交于
      When viewing page owner information, we may want to select blocks whose
      PID/TGID/TASK_COMM_NAME appears in a user-specified list for data analysis
      and aggregation.  But currently page_owner_sort only supports selecting
      blocks associated with only one specified PID/TGID/TASK_COMM_NAME.
      
      Therefore, following adjustments are made to fix the problem:
      
      1. Enhance selecting function to support the selection of multiple
         PIDs/TGIDs/TASK_COMM_NAMEs.
      
      The enhanced usages are as follows:
      
      --pid <pidlist>         Select by pid. This selects the blocks whose PID
                              numbers appear in <pidlist>.
      --tgid <tgidlist>       Select by tgid. This selects the blocks whose
                              TGID numbers appear in <tgidlist>.
      --name <cmdlist>        Select by task command name. This selects the
                              blocks whose task command name appear in <cmdlist>.
      
      Where <pidlist>, <tgidlist>, <cmdlist> are single arguments in the form of
      a comma-separated list,which offers a way to specify individual selecting
      rules.
      
      For example, if you want to select blocks whose tgids are 1, 2 or 3, you
      have to use 4 commands as follows:
      
              ./page_owner_sort <input> <output1> --tgid=1
              ./page_owner_sort <input> <output2> --tgid=2
              ./page_owner_sort <input> <output3> --tgid=3
              cat <output1> <output2> <output3> > <output>
      
      With this patch, you can use only 1 command to obtain the same result as
      above:
      
              ./page_owner_sort <input> <output1> --tgid=1,2,3
      
      2. Update explanations of --pid, --tgid and --name in the function
         usage() and the document(Documents/vm/page_owner.rst).
      
      This work is coauthored by
              Yixuan Cao
              Shenghong Han
              Yinan Zhang
              Chongxi Zhao
              Yuhong Feng
              Yongqiang Liu
      
      Link: https://lkml.kernel.org/r/20220401024856.767-2-yejiajian2018@email.szu.edu.cnSigned-off-by: NJiajian Ye <yejiajian2018@email.szu.edu.cn>
      Cc: Chongxi Zhao <zhaochongxi2019@email.szu.edu.cn>
      Cc: Shenghong Han <hanshenghong2019@email.szu.edu.cn>
      Cc: Yinan Zhang <zhangyinan2019@email.szu.edu.cn>
      Cc: Yixuan Cao <caoyixuan2019@email.szu.edu.cn>
      Cc: Yongqiang Liu <liuyongqiang13@huawei.com>
      Cc: Yuhong Feng <yuhongf@szu.edu.cn>
      Cc: Haowen Bai <baihaowen@meizu.com>
      Cc: Sean Anderson <seanga2@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      75382a2d
    • J
      tools/vm/page_owner_sort.c: use fprintf() to send error messages to stderr · 329687a0
      Jiajian Ye 提交于
      Error messages should be send to stderr using fprintf() instead of
      printf().
      
      This work is coauthored by
              Yixuan Cao
              Shenghong Han
              Yinan Zhang
              Chongxi Zhao
              Yuhong Feng
              Yongqiang Liu
      
      Link: https://lkml.kernel.org/r/20220401024856.767-1-yejiajian2018@email.szu.edu.cnSigned-off-by: NJiajian Ye <yejiajian2018@email.szu.edu.cn>
      Cc: Shenghong Han <hanshenghong2019@email.szu.edu.cn>
      Cc: Yixuan Cao <caoyixuan2019@email.szu.edu.cn>
      Cc: Yinan Zhang <zhangyinan2019@email.szu.edu.cn>
      Cc: Chongxi Zhao <zhaochongxi2019@email.szu.edu.cn>
      Cc: Yuhong Feng <yuhongf@szu.edu.cn>
      Cc: Yongqiang Liu <liuyongqiang13@huawei.com>
      Cc: Haowen Bai <baihaowen@meizu.com>
      Cc: Sean Anderson <seanga2@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      329687a0
    • L
      Merge tag 'drm-fixes-2022-04-29' of git://anongit.freedesktop.org/drm/drm · 38d741cb
      Linus Torvalds 提交于
      Pull drm fixes from Dave Airlie:
       "Another relatively quiet week, amdgpu leads the way, some i915 display
        fixes, and a single sunxi fix.
      
        amdgpu:
         - Runtime pm fix
         - DCN memory leak fix in error path
         - SI DPM deadlock fix
         - S0ix fix
      
        amdkfd:
         - GWS fix
         - GWS support for CRIU
      
        i915:
         - Fix #5284: Backlight control regression on XMG Core 15 e21
         - Fix black display plane on Acer One AO532h
         - Two smaller display fixes
      
        sunxi:
         - Single fix removing applying PHYS_OFFSET twice"
      
      * tag 'drm-fixes-2022-04-29' of git://anongit.freedesktop.org/drm/drm:
        drm/amdgpu: keep mmhub clock gating being enabled during s2idle suspend
        drm/amd/pm: fix the deadlock issue observed on SI
        drm/amd/display: Fix memory leak in dcn21_clock_source_create
        drm/amdgpu: don't runtime suspend if there are displays attached (v3)
        drm/amdkfd: CRIU add support for GWS queues
        drm/amdkfd: Fix GWS queue count
        drm/sun4i: Remove obsolete references to PHYS_OFFSET
        drm/i915/fbc: Consult hw.crtc instead of uapi.crtc
        drm/i915: Fix SEL_FETCH_PLANE_*(PIPE_B+) register addresses
        drm/i915: Check EDID for HDR static metadata when choosing blc
        drm/i915: Fix DISP_POS_Y and DISP_HEIGHT defines
      38d741cb
    • D
      Merge tag 'amd-drm-fixes-5.18-2022-04-27' of... · 9d9f7207
      Dave Airlie 提交于
      Merge tag 'amd-drm-fixes-5.18-2022-04-27' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes
      
      amd-drm-fixes-5.18-2022-04-27:
      
      amdgpu:
      - Runtime pm fix
      - DCN memory leak fix in error path
      - SI DPM deadlock fix
      - S0ix fix
      
      amdkfd:
      - GWS fix
      - GWS support for CRIU
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      From: Alex Deucher <alexander.deucher@amd.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220428023232.5794-1-alexander.deucher@amd.com
      9d9f7207
    • D
      Merge tag 'drm-intel-fixes-2022-04-28' of... · 22c73ba4
      Dave Airlie 提交于
      Merge tag 'drm-intel-fixes-2022-04-28' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
      
      - Fix #5284: Backlight control regression on XMG Core 15 e21
      - Fix black display plane on Acer One AO532h
      - Two smaller display fixes
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/Ymotel5VfZUrJahf@jlahtine-mobl.ger.corp.intel.com
      22c73ba4
    • D
      Merge tag 'drm-misc-fixes-2022-04-27' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes · 43f2c104
      Dave Airlie 提交于
      drm-misc-fixes for v5.18-rc5:
      - Single fix removing applying PHYS_OFFSET twice in sunxi.
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      
      From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/f692bb62-5620-1868-91b7-dffb8d6f9175@linux.intel.com
      43f2c104
    • L
      Merge tag 'net-5.18-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 249aca0d
      Linus Torvalds 提交于
      Pull networking fixes from Jakub Kicinski:
       "Including fixes from bluetooth, bpf and netfilter.
      
        Current release - new code bugs:
      
         - bridge: switchdev: check br_vlan_group() return value
      
         - use this_cpu_inc() to increment net->core_stats, fix preempt-rt
      
        Previous releases - regressions:
      
         - eth: stmmac: fix write to sgmii_adapter_base
      
        Previous releases - always broken:
      
         - netfilter: nf_conntrack_tcp: re-init for syn packets only,
           resolving issues with TCP fastopen
      
         - tcp: md5: fix incorrect tcp_header_len for incoming connections
      
         - tcp: fix F-RTO may not work correctly when receiving DSACK
      
         - tcp: ensure use of most recently sent skb when filling rate samples
      
         - tcp: fix potential xmit stalls caused by TCP_NOTSENT_LOWAT
      
         - virtio_net: fix wrong buf address calculation when using xdp
      
         - xsk: fix forwarding when combining copy mode with busy poll
      
         - xsk: fix possible crash when multiple sockets are created
      
         - bpf: lwt: fix crash when using bpf_skb_set_tunnel_key() from
           bpf_xmit lwt hook
      
         - sctp: null-check asoc strreset_chunk in sctp_generate_reconf_event
      
         - wireguard: device: check for metadata_dst with skb_valid_dst()
      
         - netfilter: update ip6_route_me_harder to consider L3 domain
      
         - gre: make o_seqno start from 0 in native mode
      
         - gre: switch o_seqno to atomic to prevent races in collect_md mode
      
        Misc:
      
         - add Eric Dumazet to networking maintainers
      
         - dt: dsa: realtek: remove realtek,rtl8367s string
      
         - netfilter: flowtable: Remove the empty file"
      
      * tag 'net-5.18-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (65 commits)
        tcp: fix F-RTO may not work correctly when receiving DSACK
        Revert "ibmvnic: Add ethtool private flag for driver-defined queue limits"
        net: enetc: allow tc-etf offload even with NETIF_F_CSUM_MASK
        ixgbe: ensure IPsec VF<->PF compatibility
        MAINTAINERS: Update BNXT entry with firmware files
        netfilter: nft_socket: only do sk lookups when indev is available
        net: fec: add missing of_node_put() in fec_enet_init_stop_mode()
        bnx2x: fix napi API usage sequence
        tls: Skip tls_append_frag on zero copy size
        Add Eric Dumazet to networking maintainers
        netfilter: conntrack: fix udp offload timeout sysctl
        netfilter: nf_conntrack_tcp: re-init for syn packets only
        net: dsa: lantiq_gswip: Don't set GSWIP_MII_CFG_RMII_CLK
        net: Use this_cpu_inc() to increment net->core_stats
        Bluetooth: hci_sync: Cleanup hci_conn if it cannot be aborted
        Bluetooth: hci_event: Fix creating hci_conn object on error status
        Bluetooth: hci_event: Fix checking for invalid handle on error status
        ice: fix use-after-free when deinitializing mailbox snapshot
        ice: wait 5 s for EMP reset after firmware flash
        ice: Protect vf_state check by cfg_lock in ice_vc_process_vf_msg()
        ...
      249aca0d
    • L
      Merge tag 'thermal-5.18-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 3c76fe74
      Linus Torvalds 提交于
      Pull thermal control fixes from Rafael Wysocki:
       "These take back recent chages that started to confuse users and fix up
        an attr.show callback prototype in a driver.
      
        Specifics:
      
         - Stop warning about deprecation of the userspace thermal governor
           and cooling device status interface, because there are cases in
           which user space has to drive thermal management with the help of
           them (Daniel Lezcano)
      
         - Fix attr.show callback prototype in the int340x thermal driver
           (Kees Cook)"
      
      * tag 'thermal-5.18-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        thermal/governor: Remove deprecated information
        Revert "thermal/core: Deprecate changing cooling device state from userspace"
        thermal: int340x: Fix attr.show callback prototype
      3c76fe74
    • L
      Merge tag 'pm-5.18-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 659ed6e2
      Linus Torvalds 提交于
      Pull power management fixes from Rafael Wysocki:
       "These fix up recent intel_idle driver changes and fix some ARM cpufreq
        driver issues.
      
        Specifics:
      
         - Fix issues with the Qualcomm's cpufreq driver (Dmitry Baryshkov,
           Vladimir Zapolskiy).
      
         - Fix memory leak with the Sun501 driver (Xiaobing Luo).
      
         - Make intel_idle enable C1E promotion on all CPUs when C1E is
           preferred to C1 (Artem Bityutskiy).
      
         - Make C6 optimization on Sapphire Rapids added recently work as
           expected if both C1E and C1 are "preferred" (Artem Bityutskiy)"
      
      * tag 'pm-5.18-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        intel_idle: Fix SPR C6 optimization
        intel_idle: Fix the 'preferred_cstates' module parameter
        cpufreq: qcom-cpufreq-hw: Clear dcvs interrupts
        cpufreq: fix memory leak in sun50i_cpufreq_nvmem_probe
        cpufreq: qcom-cpufreq-hw: Fix throttle frequency value on EPSS platforms
        cpufreq: qcom-hw: provide online/offline operations
        cpufreq: qcom-hw: fix the opp entries refcounting
        cpufreq: qcom-hw: fix the race between LMH worker and cpuhp
        cpufreq: qcom-hw: drop affinity hint before freeing the IRQ
      659ed6e2
    • L
      Merge tag 'acpi-5.18-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · f12d31c0
      Linus Torvalds 提交于
      Pull ACPI fixes from Rafael WysockiL
       "These fix up the ACPI processor driver after a change made during the
        5.16 cycle that inadvertently broke falling back to shallower C-states
        when C3 cannot be used.
      
        Specifics:
      
         - Make the ACPI processor driver avoid falling back to C3 type of
           C-states when C3 cannot be requested (Ville Syrjälä)
      
         - Revert a quirk that is not necessary any more after fixing the
           underlying issue properly (Ville Syrjälä)"
      
      * tag 'acpi-5.18-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        Revert "ACPI: processor: idle: fix lockup regression on 32-bit ThinkPad T40"
        ACPI: processor: idle: Avoid falling back to C3 type C-states
      f12d31c0
    • L
      Merge tag 'platform-drivers-x86-v5.18-3' of... · 259b897e
      Linus Torvalds 提交于
      Merge tag 'platform-drivers-x86-v5.18-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
      
      Pull x86 platform driver fixes from Hans de Goede:
       "Highlights:
      
         - asus-wmi bug-fixes
      
         - intel-sdsu bug-fixes
      
         - build (warning) fixes
      
         - couple of hw-id additions"
      
      * tag 'platform-drivers-x86-v5.18-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
        platform/x86/intel: pmc/core: change pmc_lpm_modes to static
        platform/x86/intel/sdsi: Fix bug in multi packet reads
        platform/x86/intel/sdsi: Poll on ready bit for writes
        platform/x86/intel/sdsi: Handle leaky bucket
        platform/x86: intel-uncore-freq: Prevent driver loading in guests
        platform/x86: gigabyte-wmi: added support for B660 GAMING X DDR4 motherboard
        platform/x86: dell-laptop: Add quirk entry for Latitude 7520
        platform/x86: asus-wmi: Fix driver not binding when fan curve control probe fails
        platform/x86: asus-wmi: Potential buffer overflow in asus_wmi_evaluate_method_buf()
        tools/power/x86/intel-speed-select: fix build failure when using -Wl,--as-needed
      259b897e
    • L
      Merge tag 'regulator-fix-v5.18-rc4' of... · fd5a4c7d
      Linus Torvalds 提交于
      Merge tag 'regulator-fix-v5.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
      
      Pull regulator fix from Mark Brown:
       "A minor fix for the DT binding documentation of the rt5190a driver"
      
      * tag 'regulator-fix-v5.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
        regulator: dt-bindings: Revise the rt5190a buck/ldo description
      fd5a4c7d
    • P
      tcp: fix F-RTO may not work correctly when receiving DSACK · d9157f68
      Pengcheng Yang 提交于
      Currently DSACK is regarded as a dupack, which may cause
      F-RTO to incorrectly enter "loss was real" when receiving
      DSACK.
      
      Packetdrill to demonstrate:
      
      // Enable F-RTO and TLP
          0 `sysctl -q net.ipv4.tcp_frto=2`
          0 `sysctl -q net.ipv4.tcp_early_retrans=3`
          0 `sysctl -q net.ipv4.tcp_congestion_control=cubic`
      
      // Establish a connection
         +0 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
         +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
         +0 bind(3, ..., ...) = 0
         +0 listen(3, 1) = 0
      
      // RTT 10ms, RTO 210ms
        +.1 < S 0:0(0) win 32792 <mss 1000,sackOK,nop,nop,nop,wscale 7>
         +0 > S. 0:0(0) ack 1 <...>
       +.01 < . 1:1(0) ack 1 win 257
         +0 accept(3, ..., ...) = 4
      
      // Send 2 data segments
         +0 write(4, ..., 2000) = 2000
         +0 > P. 1:2001(2000) ack 1
      
      // TLP
      +.022 > P. 1001:2001(1000) ack 1
      
      // Continue to send 8 data segments
         +0 write(4, ..., 10000) = 10000
         +0 > P. 2001:10001(8000) ack 1
      
      // RTO
      +.188 > . 1:1001(1000) ack 1
      
      // The original data is acked and new data is sent(F-RTO step 2.b)
         +0 < . 1:1(0) ack 2001 win 257
         +0 > P. 10001:12001(2000) ack 1
      
      // D-SACK caused by TLP is regarded as a dupack, this results in
      // the incorrect judgment of "loss was real"(F-RTO step 3.a)
      +.022 < . 1:1(0) ack 2001 win 257 <sack 1001:2001,nop,nop>
      
      // Never-retransmitted data(3001:4001) are acked and
      // expect to switch to open state(F-RTO step 3.b)
         +0 < . 1:1(0) ack 4001 win 257
      +0 %{ assert tcpi_ca_state == 0, tcpi_ca_state }%
      
      Fixes: e33099f9 ("tcp: implement RFC5682 F-RTO")
      Signed-off-by: NPengcheng Yang <yangpc@wangsu.com>
      Acked-by: NNeal Cardwell <ncardwell@google.com>
      Tested-by: NNeal Cardwell <ncardwell@google.com>
      Reviewed-by: NEric Dumazet <edumazet@google.com>
      Link: https://lore.kernel.org/r/1650967419-2150-1-git-send-email-yangpc@wangsu.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      d9157f68
    • J
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf · c26d0d98
      Jakub Kicinski 提交于
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter fixes for net
      
      1) Fix incorrect TCP connection tracking window reset for non-syn
         packets, from Florian Westphal.
      
      2) Incorrect dependency on CONFIG_NFT_FLOW_OFFLOAD, from Volodymyr Mytnyk.
      
      3) Fix nft_socket from the output path, from Florian Westphal.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf:
        netfilter: nft_socket: only do sk lookups when indev is available
        netfilter: conntrack: fix udp offload timeout sysctl
        netfilter: nf_conntrack_tcp: re-init for syn packets only
      ====================
      
      Link: https://lore.kernel.org/r/20220428142109.38726-1-pablo@netfilter.orgSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      c26d0d98
    • L
      Merge tag 'gfs2-v5.18-rc4-fix2' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 · 4a2316a1
      Linus Torvalds 提交于
      Pull gfs2 fix from Andreas Gruenbacher:
      
       - No short reads or writes upon glock contention
      
      * tag 'gfs2-v5.18-rc4-fix2' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2:
        gfs2: No short reads or writes upon glock contention
      4a2316a1
    • D
      Revert "ibmvnic: Add ethtool private flag for driver-defined queue limits" · aeaf59b7
      Dany Madden 提交于
      This reverts commit 723ad916
      
      When client requests channel or ring size larger than what the server
      can support the server will cap the request to the supported max. So,
      the client would not be able to successfully request resources that
      exceed the server limit.
      
      Fixes: 723ad916 ("ibmvnic: Add ethtool private flag for driver-defined queue limits")
      Signed-off-by: NDany Madden <drt@linux.ibm.com>
      Link: https://lore.kernel.org/r/20220427235146.23189-1-drt@linux.ibm.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      aeaf59b7
    • V
      net: enetc: allow tc-etf offload even with NETIF_F_CSUM_MASK · 66a2f5ef
      Vladimir Oltean 提交于
      The Time-Specified Departure feature is indeed mutually exclusive with
      TX IP checksumming in ENETC, but TX checksumming in itself is broken and
      was removed from this driver in commit 82728b91 ("enetc: Remove Tx
      checksumming offload code").
      
      The blamed commit declared NETIF_F_HW_CSUM in dev->features to comply
      with software TSO's expectations, and still did the checksumming in
      software by calling skb_checksum_help(). So there isn't any restriction
      for the Time-Specified Departure feature.
      
      However, enetc_setup_tc_txtime() doesn't understand that, and blindly
      looks for NETIF_F_CSUM_MASK.
      
      Instead of checking for things which can literally never happen in the
      current code base, just remove the check and let the driver offload
      tc-etf qdiscs.
      
      Fixes: acede3c5 ("net: enetc: declare NETIF_F_HW_CSUM and do it in software")
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Link: https://lore.kernel.org/r/20220427203017.1291634-1-vladimir.oltean@nxp.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      66a2f5ef
    • L
      ixgbe: ensure IPsec VF<->PF compatibility · f049efc7
      Leon Romanovsky 提交于
      The VF driver can forward any IPsec flags and such makes the function
      is not extendable and prone to backward/forward incompatibility.
      
      If new software runs on VF, it won't know that PF configured something
      completely different as it "knows" only XFRM_OFFLOAD_INBOUND flag.
      
      Fixes: eda0333a ("ixgbe: add VF IPsec management")
      Reviewed-by: NRaed Salem <raeds@nvidia.com>
      Signed-off-by: NLeon Romanovsky <leonro@nvidia.com>
      Reviewed-by: NShannon Nelson <snelson@pensando.io>
      Tested-by: NKonrad Jankowski <konrad0.jankowski@intel.com>
      Signed-off-by: NTony Nguyen <anthony.l.nguyen@intel.com>
      Link: https://lore.kernel.org/r/20220427173152.443102-1-anthony.l.nguyen@intel.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      f049efc7
    • L
      Merge tag 'xfs-5.18-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · 8061e16e
      Linus Torvalds 提交于
      Pull xfs fixes from Dave Chinner:
      
       - define buffer bit flags as unsigned to fix gcc-5 + c11 warnings
      
       - remove redundant XFS fields from MAINTAINERS
      
       - fix inode buffer locking order regression
      
      * tag 'xfs-5.18-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        xfs: reorder iunlink remove operation in xfs_ifree
        MAINTAINERS: update IOMAP FILESYSTEM LIBRARY and XFS FILESYSTEM
        xfs: convert buffer flags to unsigned.
      8061e16e
    • F
      MAINTAINERS: Update BNXT entry with firmware files · 126858db
      Florian Fainelli 提交于
      There appears to be a maintainer gap for BNXT TEE firmware files which
      causes some patches to be missed. Update the entry for the BNXT Ethernet
      controller with its companion firmware files.
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Reviewed-by: NMichael Chan <michael.chan@broadcom.com>
      Link: https://lore.kernel.org/r/20220427163606.126154-1-f.fainelli@gmail.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      126858db
  2. 28 4月, 2022 15 次提交
    • R
      Merge branch 'thermal-int340x' · a12475f9
      Rafael J. Wysocki 提交于
      Merge a fix for the attr.show callback prototype in the int340x thermal
      driver (Kees Cook).
      
      * thermal-int340x:
        thermal: int340x: Fix attr.show callback prototype
      a12475f9
    • F
      netfilter: nft_socket: only do sk lookups when indev is available · 743b83f1
      Florian Westphal 提交于
      Check if the incoming interface is available and NFT_BREAK
      in case neither skb->sk nor input device are set.
      
      Because nf_sk_lookup_slow*() assume packet headers are in the
      'in' direction, use in postrouting is not going to yield a meaningful
      result.  Same is true for the forward chain, so restrict the use
      to prerouting, input and output.
      
      Use in output work if a socket is already attached to the skb.
      
      Fixes: 554ced0a ("netfilter: nf_tables: add support for native socket matching")
      Reported-and-tested-by: NTopi Miettinen <toiwoton@gmail.com>
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      743b83f1
    • R
      Merge branch 'pm-cpuidle' · edbd9772
      Rafael J. Wysocki 提交于
      Merge cpuidle fixes for 5.18-rc5:
      
       - Make intel_idle enable C1E promotion on all CPUs when C1E is
         preferred to C1 (Artem Bityutskiy).
      
       - Make C6 optimization on Sapphire Rapids added recently work as
         expected if both C1E and C1 are "preferred" (Artem Bityutskiy).
      
      * pm-cpuidle:
        intel_idle: Fix SPR C6 optimization
        intel_idle: Fix the 'preferred_cstates' module parameter
      edbd9772
    • A
      gfs2: No short reads or writes upon glock contention · 296abc0d
      Andreas Gruenbacher 提交于
      Commit 00bfe02f ("gfs2: Fix mmap + page fault deadlocks for buffered
      I/O") changed gfs2_file_read_iter() and gfs2_file_buffered_write() to
      allow dropping the inode glock while faulting in user buffers.  When the
      lock was dropped, a short result was returned to indicate that the
      operation was interrupted.
      
      As pointed out by Linus (see the link below), this behavior is broken
      and the operations should always re-acquire the inode glock and resume
      the operation instead.
      
      Link: https://lore.kernel.org/lkml/CAHk-=whaz-g_nOOoo8RRiWNjnv2R+h6_xk2F1J4TuSRxk1MtLw@mail.gmail.com/
      Fixes: 00bfe02f ("gfs2: Fix mmap + page fault deadlocks for buffered I/O")
      Signed-off-by: NAndreas Gruenbacher <agruenba@redhat.com>
      296abc0d
    • P
      Merge tag 'for-net-2022-04-27' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth · febb2d2f
      Paolo Abeni 提交于
      Luiz Augusto von Dentz says:
      
      ====================
      bluetooth pull request for net:
      
       - Fix regression causing some HCI events to be discarded when they
         shouldn't.
      
      * tag 'for-net-2022-04-27' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth:
        Bluetooth: hci_sync: Cleanup hci_conn if it cannot be aborted
        Bluetooth: hci_event: Fix creating hci_conn object on error status
        Bluetooth: hci_event: Fix checking for invalid handle on error status
      ====================
      
      Link: https://lore.kernel.org/r/20220427234031.1257281-1-luiz.dentz@gmail.comSigned-off-by: NPaolo Abeni <pabeni@redhat.com>
      febb2d2f
    • Y
      net: fec: add missing of_node_put() in fec_enet_init_stop_mode() · d2b52ec0
      Yang Yingliang 提交于
      Put device node in error path in fec_enet_init_stop_mode().
      
      Fixes: 8a448bf8 ("net: ethernet: fec: move GPR register offset and bit into DT")
      Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
      Link: https://lore.kernel.org/r/20220426125231.375688-1-yangyingliang@huawei.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      d2b52ec0
    • M
      bnx2x: fix napi API usage sequence · af68656d
      Manish Chopra 提交于
      While handling PCI errors (AER flow) driver tries to
      disable NAPI [napi_disable()] after NAPI is deleted
      [__netif_napi_del()] which causes unexpected system
      hang/crash.
      
      System message log shows the following:
      =======================================
      [ 3222.537510] EEH: Detected PCI bus error on PHB#384-PE#800000 [ 3222.537511] EEH: This PCI device has failed 2 times in the last hour and will be permanently disabled after 5 failures.
      [ 3222.537512] EEH: Notify device drivers to shutdown [ 3222.537513] EEH: Beginning: 'error_detected(IO frozen)'
      [ 3222.537514] EEH: PE#800000 (PCI 0384:80:00.0): Invoking
      bnx2x->error_detected(IO frozen)
      [ 3222.537516] bnx2x: [bnx2x_io_error_detected:14236(eth14)]IO error detected [ 3222.537650] EEH: PE#800000 (PCI 0384:80:00.0): bnx2x driver reports:
      'need reset'
      [ 3222.537651] EEH: PE#800000 (PCI 0384:80:00.1): Invoking
      bnx2x->error_detected(IO frozen)
      [ 3222.537651] bnx2x: [bnx2x_io_error_detected:14236(eth13)]IO error detected [ 3222.537729] EEH: PE#800000 (PCI 0384:80:00.1): bnx2x driver reports:
      'need reset'
      [ 3222.537729] EEH: Finished:'error_detected(IO frozen)' with aggregate recovery state:'need reset'
      [ 3222.537890] EEH: Collect temporary log [ 3222.583481] EEH: of node=0384:80:00.0 [ 3222.583519] EEH: PCI device/vendor: 168e14e4 [ 3222.583557] EEH: PCI cmd/status register: 00100140 [ 3222.583557] EEH: PCI-E capabilities and status follow:
      [ 3222.583744] EEH: PCI-E 00: 00020010 012c8da2 00095d5e 00455c82 [ 3222.583892] EEH: PCI-E 10: 10820000 00000000 00000000 00000000 [ 3222.583893] EEH: PCI-E 20: 00000000 [ 3222.583893] EEH: PCI-E AER capability register set follows:
      [ 3222.584079] EEH: PCI-E AER 00: 13c10001 00000000 00000000 00062030 [ 3222.584230] EEH: PCI-E AER 10: 00002000 000031c0 000001e0 00000000 [ 3222.584378] EEH: PCI-E AER 20: 00000000 00000000 00000000 00000000 [ 3222.584416] EEH: PCI-E AER 30: 00000000 00000000 [ 3222.584416] EEH: of node=0384:80:00.1 [ 3222.584454] EEH: PCI device/vendor: 168e14e4 [ 3222.584491] EEH: PCI cmd/status register: 00100140 [ 3222.584492] EEH: PCI-E capabilities and status follow:
      [ 3222.584677] EEH: PCI-E 00: 00020010 012c8da2 00095d5e 00455c82 [ 3222.584825] EEH: PCI-E 10: 10820000 00000000 00000000 00000000 [ 3222.584826] EEH: PCI-E 20: 00000000 [ 3222.584826] EEH: PCI-E AER capability register set follows:
      [ 3222.585011] EEH: PCI-E AER 00: 13c10001 00000000 00000000 00062030 [ 3222.585160] EEH: PCI-E AER 10: 00002000 000031c0 000001e0 00000000 [ 3222.585309] EEH: PCI-E AER 20: 00000000 00000000 00000000 00000000 [ 3222.585347] EEH: PCI-E AER 30: 00000000 00000000 [ 3222.586872] RTAS: event: 5, Type: Platform Error (224), Severity: 2 [ 3222.586873] EEH: Reset without hotplug activity [ 3224.762767] EEH: Beginning: 'slot_reset'
      [ 3224.762770] EEH: PE#800000 (PCI 0384:80:00.0): Invoking
      bnx2x->slot_reset()
      [ 3224.762771] bnx2x: [bnx2x_io_slot_reset:14271(eth14)]IO slot reset initializing...
      [ 3224.762887] bnx2x 0384:80:00.0: enabling device (0140 -> 0142) [ 3224.768157] bnx2x: [bnx2x_io_slot_reset:14287(eth14)]IO slot reset
      --> driver unload
      
      Uninterruptible tasks
      =====================
      crash> ps | grep UN
           213      2  11  c000000004c89e00  UN   0.0       0      0  [eehd]
           215      2   0  c000000004c80000  UN   0.0       0      0
      [kworker/0:2]
          2196      1  28  c000000004504f00  UN   0.1   15936  11136  wickedd
          4287      1   9  c00000020d076800  UN   0.0    4032   3008  agetty
          4289      1  20  c00000020d056680  UN   0.0    7232   3840  agetty
         32423      2  26  c00000020038c580  UN   0.0       0      0
      [kworker/26:3]
         32871   4241  27  c0000002609ddd00  UN   0.1   18624  11648  sshd
         32920  10130  16  c00000027284a100  UN   0.1   48512  12608  sendmail
         33092  32987   0  c000000205218b00  UN   0.1   48512  12608  sendmail
         33154   4567  16  c000000260e51780  UN   0.1   48832  12864  pickup
         33209   4241  36  c000000270cb6500  UN   0.1   18624  11712  sshd
         33473  33283   0  c000000205211480  UN   0.1   48512  12672  sendmail
         33531   4241  37  c00000023c902780  UN   0.1   18624  11648  sshd
      
      EEH handler hung while bnx2x sleeping and holding RTNL lock
      ===========================================================
      crash> bt 213
      PID: 213    TASK: c000000004c89e00  CPU: 11  COMMAND: "eehd"
        #0 [c000000004d477e0] __schedule at c000000000c70808
        #1 [c000000004d478b0] schedule at c000000000c70ee0
        #2 [c000000004d478e0] schedule_timeout at c000000000c76dec
        #3 [c000000004d479c0] msleep at c0000000002120cc
        #4 [c000000004d479f0] napi_disable at c000000000a06448
                                              ^^^^^^^^^^^^^^^^
        #5 [c000000004d47a30] bnx2x_netif_stop at c0080000018dba94 [bnx2x]
        #6 [c000000004d47a60] bnx2x_io_slot_reset at c0080000018a551c [bnx2x]
        #7 [c000000004d47b20] eeh_report_reset at c00000000004c9bc
        #8 [c000000004d47b90] eeh_pe_report at c00000000004d1a8
        #9 [c000000004d47c40] eeh_handle_normal_event at c00000000004da64
      
      And the sleeping source code
      ============================
      crash> dis -ls c000000000a06448
      FILE: ../net/core/dev.c
      LINE: 6702
      
         6697  {
         6698          might_sleep();
         6699          set_bit(NAPI_STATE_DISABLE, &n->state);
         6700
         6701          while (test_and_set_bit(NAPI_STATE_SCHED, &n->state))
      * 6702                  msleep(1);
         6703          while (test_and_set_bit(NAPI_STATE_NPSVC, &n->state))
         6704                  msleep(1);
         6705
         6706          hrtimer_cancel(&n->timer);
         6707
         6708          clear_bit(NAPI_STATE_DISABLE, &n->state);
         6709  }
      
      EEH calls into bnx2x twice based on the system log above, first through
      bnx2x_io_error_detected() and then bnx2x_io_slot_reset(), and executes
      the following call chains:
      
      bnx2x_io_error_detected()
        +-> bnx2x_eeh_nic_unload()
             +-> bnx2x_del_all_napi()
                  +-> __netif_napi_del()
      
      bnx2x_io_slot_reset()
        +-> bnx2x_netif_stop()
             +-> bnx2x_napi_disable()
                  +->napi_disable()
      
      Fix this by correcting the sequence of NAPI APIs usage,
      that is delete the NAPI after disabling it.
      
      Fixes: 7fa6f340 ("bnx2x: AER revised")
      Reported-by: NDavid Christensen <drc@linux.vnet.ibm.com>
      Tested-by: NDavid Christensen <drc@linux.vnet.ibm.com>
      Signed-off-by: NManish Chopra <manishc@marvell.com>
      Signed-off-by: NAriel Elior <aelior@marvell.com>
      Link: https://lore.kernel.org/r/20220426153913.6966-1-manishc@marvell.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      af68656d
    • M
      tls: Skip tls_append_frag on zero copy size · a0df7194
      Maxim Mikityanskiy 提交于
      Calling tls_append_frag when max_open_record_len == record->len might
      add an empty fragment to the TLS record if the call happens to be on the
      page boundary. Normally tls_append_frag coalesces the zero-sized
      fragment to the previous one, but not if it's on page boundary.
      
      If a resync happens then, the mlx5 driver posts dump WQEs in
      tx_post_resync_dump, and the empty fragment may become a data segment
      with byte_count == 0, which will confuse the NIC and lead to a CQE
      error.
      
      This commit fixes the described issue by skipping tls_append_frag on
      zero size to avoid adding empty fragments. The fix is not in the driver,
      because an empty fragment is hardly the desired behavior.
      
      Fixes: e8f69799 ("net/tls: Add generic NIC offload infrastructure")
      Signed-off-by: NMaxim Mikityanskiy <maximmi@nvidia.com>
      Reviewed-by: NTariq Toukan <tariqt@nvidia.com>
      Link: https://lore.kernel.org/r/20220426154949.159055-1-maximmi@nvidia.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      a0df7194
    • J
      Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf · 347cb5de
      Jakub Kicinski 提交于
      Daniel Borkmann says:
      
      ====================
      pull-request: bpf 2022-04-27
      
      We've added 5 non-merge commits during the last 20 day(s) which contain
      a total of 6 files changed, 34 insertions(+), 12 deletions(-).
      
      The main changes are:
      
      1) Fix xsk sockets when rx and tx are separately bound to the same umem, also
         fix xsk copy mode combined with busy poll, from Maciej Fijalkowski.
      
      2) Fix BPF tunnel/collect_md helpers with bpf_xmit lwt hook usage which triggered
         a crash due to invalid metadata_dst access, from Eyal Birger.
      
      3) Fix release of page pool in XDP live packet mode, from Toke Høiland-Jørgensen.
      
      4) Fix potential NULL pointer dereference in kretprobes, from Adam Zabrocki.
      
         (Masami & Steven preferred this small fix to be routed via bpf tree given it's
          follow-up fix to Masami's rethook work that went via bpf earlier, too.)
      
      * https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf:
        xsk: Fix possible crash when multiple sockets are created
        kprobes: Fix KRETPROBES when CONFIG_KRETPROBE_ON_RETHOOK is set
        bpf, lwt: Fix crash when using bpf_skb_set_tunnel_key() from bpf_xmit lwt hook
        bpf: Fix release of page_pool in BPF_PROG_RUN in test runner
        xsk: Fix l2fwd for copy mode + busy poll combo
      ====================
      
      Link: https://lore.kernel.org/r/20220427212748.9576-1-daniel@iogearbox.netSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      347cb5de
    • P
      drm/amdgpu: keep mmhub clock gating being enabled during s2idle suspend · fb8cc331
      Prike Liang 提交于
      Without MMHUB clock gating being enabled then MMHUB will not disconnect
      from DF and will result in DF C-state entry can't be accessed during S2idle
      suspend, and eventually s0ix entry will be blocked.
      Signed-off-by: NPrike Liang <Prike.Liang@amd.com>
      Acked-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      fb8cc331
    • E
      drm/amd/pm: fix the deadlock issue observed on SI · a71849cd
      Evan Quan 提交于
      The adev->pm.mutx is already held at the beginning of
      amdgpu_dpm_compute_clocks/amdgpu_dpm_enable_uvd/amdgpu_dpm_enable_vce.
      But on their calling path, amdgpu_display_bandwidth_update will be
      called and thus its sub functions amdgpu_dpm_get_sclk/mclk. They
      will then try to acquire the same adev->pm.mutex and deadlock will
      occur.
      
      By placing amdgpu_display_bandwidth_update outside of adev->pm.mutex
      protection(considering logically they do not need such protection) and
      restructuring the call flow accordingly, we can eliminate the deadlock
      issue. This comes with no real logics change.
      
      Fixes: 3712e7a4 ("drm/amd/pm: unified lock protections in amdgpu_dpm.c")
      Reported-by: NPaul Menzel <pmenzel@molgen.mpg.de>
      Reported-by: NArthur Marsh <arthur.marsh@internode.on.net>
      Link: https://lore.kernel.org/all/9e689fea-6c69-f4b0-8dee-32c4cf7d8f9c@molgen.mpg.de/
      BugLink: https://gitlab.freedesktop.org/drm/amd/-/issues/1957Signed-off-by: NEvan Quan <evan.quan@amd.com>
      Reviewed-by: NLijo Lazar <lijo.lazar@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      a71849cd
    • M
      drm/amd/display: Fix memory leak in dcn21_clock_source_create · 65e54987
      Miaoqian Lin 提交于
      When dcn20_clk_src_construct() fails, we need to release clk_src.
      
      Fixes: 6f4e6361 ("drm/amd/display: Add Renoir resource (v2)")
      Signed-off-by: NMiaoqian Lin <linmq006@gmail.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      65e54987
    • A
      drm/amdgpu: don't runtime suspend if there are displays attached (v3) · f95af4a9
      Alex Deucher 提交于
      We normally runtime suspend when there are displays attached if they
      are in the DPMS off state, however, if something wakes the GPU
      we send a hotplug event on resume (in case any displays were connected
      while the GPU was in suspend) which can cause userspace to light
      up the displays again soon after they were turned off.
      
      Prior to
      commit 087451f3 ("drm/amdgpu: use generic fb helpers instead of setting up AMD own's."),
      the driver took a runtime pm reference when the fbdev emulation was
      enabled because we didn't implement proper shadowing support for
      vram access when the device was off so the device never runtime
      suspended when there was a console bound.  Once that commit landed,
      we now utilize the core fb helper implementation which properly
      handles the emulation, so runtime pm now suspends in cases where it did
      not before.  Ultimately, we need to sort out why runtime suspend in not
      working in this case for some users, but this should restore similar
      behavior to before.
      
      v2: move check into runtime_suspend
      v3: wake ups -> wakeups in comment, retain pm_runtime behavior in
          runtime_idle callback
      
      Fixes: 087451f3 ("drm/amdgpu: use generic fb helpers instead of setting up AMD own's.")
      Link: https://lore.kernel.org/r/20220403132322.51c90903@darkstar.example.org/Tested-by: NMichele Ballabio <ballabio.m@gmail.com>
      Reviewed-by: NEvan Quan <evan.quan@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      f95af4a9
    • D
      drm/amdkfd: CRIU add support for GWS queues · f567656f
      David Yat Sin 提交于
      Add support to checkpoint/restore GWS (Global Wave Sync) queues.
      Signed-off-by: NDavid Yat Sin <david.yatsin@amd.com>
      Reviewed-by: NFelix Kuehling <Felix.Kuehling@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      f567656f
    • D
      drm/amdkfd: Fix GWS queue count · 7c6b6e18
      David Yat Sin 提交于
      dqm->gws_queue_count and pdd->qpd.mapped_gws_queue need to be updated
      each time the queue gets evicted.
      
      Fixes: b8020b03 ("drm/amdkfd: Enable over-subscription with >1 GWS queue")
      Signed-off-by: NDavid Yat Sin <david.yatsin@amd.com>
      Reviewed-by: NFelix Kuehling <Felix.Kuehling@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      7c6b6e18