1. 18 Mar, 2023 1 commit
    • Linus Torvalds's avatar
      media: m5mols: fix off-by-one loop termination error · efbcbb12
      Linus Torvalds authored
      The __find_restype() function loops over the m5mols_default_ffmt[]
      array, and the termination condition ends up being wrong: instead of
      stopping when the iterator becomes the size of the array it traverses,
      it stops after it has already overshot the array.
      
      Now, in practice this doesn't likely matter, because the code will
      always find the entry it looks for, and will thus return early and never
      hit that last extra iteration.
      
      But it turns out that clang will unroll the loop fully, because it has
      only two iterations (well, three due to the off-by-one bug), and then
      clang will end up just giving up in the middle of the loop unrolling
      when it notices that the code walks past the end of the array.
      
      And that made 'objtool' very unhappy indeed, because the generated code
      just falls off the edge of the universe, and ends up falling through to
      the next function, causing this warning:
      
         drivers/media/i2c/m5mols/m5mols.o: warning: objtool: m5mols_set_fmt() falls through to next function m5mols_get_frame_desc()
      
      Fix the loop ending condition.
      Reported-by: default avatarJens Axboe <axboe@kernel.dk>
      Analyzed-by: default avatarMiguel Ojeda <miguel.ojeda.sandonis@gmail.com>
      Analyzed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      Link: https://lore.kernel.org/linux-block/CAHk-=wgTSdKYbmB1JYM5vmHMcD9J9UZr0mn7BOYM_LudrP+Xvw@mail.gmail.com/
      Fixes: bc125106 ("[media] Add support for M-5MOLS 8 Mega Pixel camera ISP")
      Cc: HeungJun, Kim <riverful.kim@samsung.com>
      Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
      Cc: Kyungmin Park <kyungmin.park@samsung.com>
      Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      efbcbb12
  2. 17 Mar, 2023 39 commits
    • Linus Torvalds's avatar
      Merge tag 'net-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 478a351c
      Linus Torvalds authored
      Pull networking fixes from Jakub Kicinski:
       "Including fixes from netfilter, wifi and ipsec.
      
        A little more changes than usual, but it's pretty normal for us that
        the rc3/rc4 PRs are oversized as people start testing in earnest.
      
        Possibly an extra boost from people deploying the 6.1 LTS but that's
        more of an unscientific hunch.
      
        Current release - regressions:
      
         - phy: mscc: fix deadlock in phy_ethtool_{get,set}_wol()
      
         - virtio: vsock: don't use skbuff state to account credit
      
         - virtio: vsock: don't drop skbuff on copy failure
      
         - virtio_net: fix page_to_skb() miscalculating the memory size
      
        Current release - new code bugs:
      
         - eth: correct xdp_features after device reconfig
      
         - wifi: nl80211: fix the puncturing bitmap policy
      
         - net/mlx5e: flower:
            - fix raw counter initialization
            - fix missing error code
            - fix cloned flow attribute
      
         - ipa:
            - fix some register validity checks
            - fix a surprising number of bad offsets
            - kill FILT_ROUT_CACHE_CFG IPA register
      
        Previous releases - regressions:
      
         - tcp: fix bind() conflict check for dual-stack wildcard address
      
         - veth: fix use after free in XDP_REDIRECT when skb headroom is small
      
         - ipv4: fix incorrect table ID in IOCTL path
      
         - ipvlan: make skb->skb_iif track skb->dev for l3s mode
      
         - mptcp:
            - fix possible deadlock in subflow_error_report
            - fix UaFs when destroying unaccepted and listening sockets
      
         - dsa: mv88e6xxx: fix max_mtu of 1492 on 6165, 6191, 6220, 6250, 6290
      
        Previous releases - always broken:
      
         - tcp: tcp_make_synack() can be called from process context, don't
           assume preemption is disabled when updating stats
      
         - netfilter: correct length for loading protocol registers
      
         - virtio_net: add checking sq is full inside xdp xmit
      
         - bonding: restore IFF_MASTER/SLAVE flags on bond enslave Ethertype
           change
      
         - phy: nxp-c45-tja11xx: fix MII_BASIC_CONFIG_REV bit number
      
         - eth: i40e: fix crash during reboot when adapter is in recovery mode
      
         - eth: ice: avoid deadlock on rtnl lock when auxiliary device
           plug/unplug meets bonding
      
         - dsa: mt7530:
            - remove now incorrect comment regarding port 5
            - set PLL frequency and trgmii only when trgmii is used
      
         - eth: mtk_eth_soc: reset PCS state when changing interface types
      
        Misc:
      
         - ynl: another license adjustment
      
         - move the TCA_EXT_WARN_MSG attribute for tc action"
      
      * tag 'net-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (108 commits)
        selftests: bonding: add tests for ether type changes
        bonding: restore bond's IFF_SLAVE flag if a non-eth dev enslave fails
        bonding: restore IFF_MASTER/SLAVE flags on bond enslave ether type change
        net: renesas: rswitch: Fix GWTSDIE register handling
        net: renesas: rswitch: Fix the output value of quote from rswitch_rx()
        ethernet: sun: add check for the mdesc_grab()
        net: ipa: fix some register validity checks
        net: ipa: kill FILT_ROUT_CACHE_CFG IPA register
        net: ipa: add two missing declarations
        net: ipa: reg: include <linux/bug.h>
        net: xdp: don't call notifiers during driver init
        net/sched: act_api: add specific EXT_WARN_MSG for tc action
        Revert "net/sched: act_api: move TCA_EXT_WARN_MSG to the correct hierarchy"
        net: dsa: microchip: fix RGMII delay configuration on KSZ8765/KSZ8794/KSZ8795
        ynl: make the tooling check the license
        ynl: broaden the license even more
        tools: ynl: make definitions optional again
        hsr: ratelimit only when errors are printed
        qed/qed_mng_tlv: correctly zero out ->min instead of ->hour
        selftests: net: devlink_port_split.py: skip test if no suitable device available
        ...
      478a351c
    • Linus Torvalds's avatar
      Merge tag 'block-6.3-2023-03-16' of git://git.kernel.dk/linux · 8d3c682a
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "A bit bigger than usual, as the NVMe pull request missed last weeks
        submission. In detail:
      
         - NVMe pull request via Christoph:
              - Avoid potential UAF in nvmet_req_complete (Damien Le Moal)
              - More quirks (Elmer Miroslav Mosher Golovin, Philipp Geulen)
              - Fix a memory leak in the nvme-pci probe teardown path
                (Irvin Cote)
              - Repair the MAINTAINERS entry (Lukas Bulwahn)
              - Fix handling single range discard request (Ming Lei)
              - Show more opcode names in trace events (Minwoo Im)
              - Fix nvme-tcp timeout reporting (Sagi Grimberg)
      
         - MD pull request via Song:
              - Two fixes for old issues (Neil)
              - Resource leak in device stopping (Xiao)
      
         - Bio based device stats fix (Yu)
      
         - Kill unused CONFIG_BLOCK_COMPAT (Lukas)
      
         - sunvdc missing mdesc_grab() failure check (Liang)
      
         - Fix for reversal of request ordering upon issue for certain cases
           (Jan)
      
         - null_blk timeout fixes (Damien)
      
         - Loop use-after-free fix (Bart)
      
         - blk-mq SRCU fix for BLK_MQ_F_BLOCKING devices (Chris)"
      
      * tag 'block-6.3-2023-03-16' of git://git.kernel.dk/linux:
        block: remove obsolete config BLOCK_COMPAT
        md: select BLOCK_LEGACY_AUTOLOAD
        block: count 'ios' and 'sectors' when io is done for bio-based device
        block: sunvdc: add check for mdesc_grab() returning NULL
        nvmet: avoid potential UAF in nvmet_req_complete()
        nvme-trace: show more opcode names
        nvme-tcp: add nvme-tcp pdu size build protection
        nvme-tcp: fix opcode reporting in the timeout handler
        nvme-pci: add NVME_QUIRK_BOGUS_NID for Lexar NM620
        nvme-pci: add NVME_QUIRK_BOGUS_NID for Netac NV3000
        nvme-pci: fixing memory leak in probe teardown path
        nvme: fix handling single range discard request
        MAINTAINERS: repair malformed T: entries in NVM EXPRESS DRIVERS
        block: null_blk: cleanup null_queue_rq()
        block: null_blk: Fix handling of fake timeout request
        blk-mq: fix "bad unlock balance detected" on q->srcu in __blk_mq_run_dispatch_ops
        loop: Fix use-after-free issues
        block: do not reverse request order when flushing plug list
        md: avoid signed overflow in slot_store()
        md: Free resources in __md_stop
      8d3c682a
    • Linus Torvalds's avatar
      Merge tag 'io_uring-6.3-2023-03-16' of git://git.kernel.dk/linux · b7966a5a
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
      
       - When PF_NO_SETAFFINITY was removed for io-wq threads, we kind of
         forgot about the SQPOLL thread. Remove it there as well, there's even
         less of a reason to set it there (Michal)
      
       - Fixup a confusing 'ret' setting (Li)
      
       - When MSG_RING is used to send a direct descriptor to another ring,
         it's possible to have it allocate it on the target ring rather than
         provide a specific index for it. If this is done, return the chosen
         value in the CQE, like we would've done locally (Pavel)
      
       - Fix a regression in this series on huge page bvec collapsing (Pavel)
      
      * tag 'io_uring-6.3-2023-03-16' of git://git.kernel.dk/linux:
        io_uring/rsrc: fix folio accounting
        io_uring/msg_ring: let target know allocated index
        io_uring: rsrc: Optimize return value variable 'ret'
        io_uring/sqpoll: Do not set PF_NO_SETAFFINITY on sqpoll threads
      b7966a5a
    • Linus Torvalds's avatar
      Merge tag 'pm-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 02ef7d39
      Linus Torvalds authored
      Pull power management fixes from Rafael Wysocki:
       "These fix an error code path issue in a cpuidle driver and make the
        sleepgraph utility more robust against unexpected input.
      
        Specifics:
      
         - Fix the psci_pd_init_topology() failure path in the PSCI cpuidle
           driver (Shawn Guo)
      
         - Modify the sleepgraph utility so it does not crash on binary data
           in device names (Todd Brandt)"
      
      * tag 'pm-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        pm-graph: sleepgraph: Avoid crashing on binary data in device names
        cpuidle: psci: Iterate backwards over list in psci_pd_remove()
      02ef7d39
    • Linus Torvalds's avatar
      Merge tag 'acpi-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · abb02a82
      Linus Torvalds authored
      Pull ACPI fixes from Rafael Wysocki:
       "These add some new quirks, fix PPTT handling, fix an ACPI utility and
        correct a mistake in the ACPI documentation.
      
        Specifics:
      
         - Fix ACPI PPTT handling to avoid sleep in the atomic context when it
           is not present (Sudeep Holla)
      
         - Add 'backlight=native' DMI quirk for Dell Vostro 15 3535 to the
           ACPI video driver (Chia-Lin Kao)
      
         - Add ACPI quirks for I2C device enumeration on Lenovo Yoga Book X90
           and Acer Iconia One 7 B1-750 (Hans de Goede)
      
         - Fix handling of invalid command line option values in the ACPI
           pfrut utility (Chen Yu)
      
         - Fix references to I2C device data type in the ACPI documentation
           for device enumeration (Andy Shevchenko)"
      
      * tag 'acpi-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: tools: pfrut: Check if the input of level and type is in the right numeric range
        ACPI: PPTT: Fix to avoid sleep in the atomic context when PPTT is absent
        ACPI: x86: Add skip i2c clients quirk for Lenovo Yoga Book X90
        ACPI: x86: Add skip i2c clients quirk for Acer Iconia One 7 B1-750
        ACPI: x86: Introduce an acpi_quirk_skip_gpio_event_handlers() helper
        ACPI: video: Add backlight=native DMI quirk for Dell Vostro 15 3535
        ACPI: docs: enumeration: Correct reference to the I²C device data type
      abb02a82
    • Linus Torvalds's avatar
      Merge branch 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux · ba9c7791
      Linus Torvalds authored
      Pull turbostat fweaks and fixes from Len Brown:
       "Leprechaun sized fixes and tweaks touching only turbostat.
      
        'Keeping happy users happy since 2010'"
      
      * 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
        tools/power turbostat: version 2023.03.17
        tools/power turbostat: fix decoding of HWP_STATUS
        tools/power turbostat: Introduce support for EMR
        tools/power turbostat: remove stray newlines from warn/warnx strings
        tools/power turbostat: Fix /dev/cpu_dma_latency warnings
        tools/power turbostat: Provide better debug messages for failed capabilities accesses
        tools/power turbostat: update dump of SECONDARY_TURBO_RATIO_LIMIT
      ba9c7791
    • Linus Torvalds's avatar
      Merge tag 'for-linus-6.3-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · 0eb392ec
      Linus Torvalds authored
      Pull xen fixes from Juergen Gross:
      
       - cleanup for xen time handling
      
       - enable the VGA console in a Xen PVH dom0
      
       - cleanup in the xenfs driver
      
      * tag 'for-linus-6.3-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen: remove unnecessary (void*) conversions
        x86/PVH: obtain VGA console info in Dom0
        x86/xen/time: cleanup xen_tsc_safe_clocksource
        xen: update arch/x86/include/asm/xen/cpuid.h
      0eb392ec
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · cb80b960
      Linus Torvalds authored
      Pull RISC-V fixes from Palmer Dabbelt:
      
       - fixes to the ASID allocator to avoid leaking stale mappings between
         tasks
      
       - fix the vmalloc fault handler to tolerate huge pages
      
      * tag 'riscv-for-linus-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        RISC-V: mm: Support huge page in vmalloc_fault()
        riscv: asid: Fixup stale TLB entry cause application crash
        Revert "riscv: mm: notify remote harts about mmu cache updates"
      cb80b960
    • Linus Torvalds's avatar
      Merge tag 's390-6.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · e50a8038
      Linus Torvalds authored
      Pull s390 fixes from Vasily Gorbik:
      
       - Update defconfigs
      
       - Fix early boot code by adding missing intersection check to prevent
         potential overwriting of the ipl report
      
       - Fix a use-after-free issue in s390-specific code related to PCI
         resources being retained after hot-unplugging individual functions,
         by removing the resources from the PCI bus's resource list and using
         the zpci_bar_struct's resource pointer directly
      
      * tag 's390-6.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390: update defconfigs
        PCI: s390: Fix use-after-free of PCI resources with per-function hotplug
        s390/ipl: add missing intersection check to ipl_report handling
      e50a8038
    • Linus Torvalds's avatar
      Merge tag 'powerpc-6.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 17adaeae
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
      
       - Fix false detection of read faults, introduced by execute-only
         support
      
       - Fix a build failure when GENERIC_ALLOCATOR is not selected
      
      Thanks to Russell Currey, Randy Dunlap, Michal Suchánek, Nathan Lynch,
      and Benjamin Gray.
      
      * tag 'powerpc-6.3-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/mm: Fix false detection of read faults
        powerpc/pseries: RTAS work area requires GENERIC_ALLOCATOR
      17adaeae
    • 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
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-cpuidle' · 1fa9d47b
      Rafael J. Wysocki authored
      Merge a PSCI cpuidle driver fix for 6.3-rc1:
      
       - Fix the psci_pd_init_topology() failure path in the PSCI cpuidle
         driver (Shawn Guo).
      
      * pm-cpuidle:
        cpuidle: psci: Iterate backwards over list in psci_pd_remove()
      1fa9d47b
    • Rafael J. Wysocki's avatar
      Merge branches 'acpi-video', 'acpi-x86', 'acpi-tools' and 'acpi-docs' · f36cc6cd
      Rafael J. Wysocki authored
      Merge a new ACPI backlight quirk, new ACPI quirks for I2C device
      enumeration on some platforms, a pfrut utility fix and an ACPI
      documentation fix for 6.3-rc3:
      
       - Add backlight=native DMI quirk for Dell Vostro 15 3535 to the ACPI
         video driver (Chia-Lin Kao).
      
       - Add ACPI quirks for I2C devices enumeration on Lenovo Yoga Book X90
         and Acer Iconia One 7 B1-750 (Hans de Goede).
      
       - Fix handling of invalid command line option values in the ACPI pfrut
         utility (Chen Yu).
      
       - Fix references to I2C device data type in the ACPI documentation for
         device enumeration (Andy Shevchenko).
      
      * acpi-video:
        ACPI: video: Add backlight=native DMI quirk for Dell Vostro 15 3535
      
      * acpi-x86:
        ACPI: x86: Add skip i2c clients quirk for Lenovo Yoga Book X90
        ACPI: x86: Add skip i2c clients quirk for Acer Iconia One 7 B1-750
        ACPI: x86: Introduce an acpi_quirk_skip_gpio_event_handlers() helper
      
      * acpi-tools:
        ACPI: tools: pfrut: Check if the input of level and type is in the right numeric range
      
      * acpi-docs:
        ACPI: docs: enumeration: Correct reference to the I²C device data type
      f36cc6cd
    • Len Brown's avatar
      tools/power turbostat: version 2023.03.17 · de7839ee
      Len Brown authored
      Happy St. Patrick's Day!
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      de7839ee
    • Antti Laakso's avatar
      tools/power turbostat: fix decoding of HWP_STATUS · 92c25393
      Antti Laakso authored
      The "excursion to minimum" information is in bit2
      in HWP_STATUS MSR. Fix the bitmask used for
      decoding the register.
      Signed-off-by: default avatarAntti Laakso <antti.laakso@intel.com>
      Reviewed-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      92c25393
    • Zhang Rui's avatar
      93cac415
    • Len Brown's avatar
      tools/power turbostat: remove stray newlines from warn/warnx strings · 6cbfedc7
      Len Brown authored
      warn(3) terminates strings with newlines
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      6cbfedc7
    • Prarit Bhargava's avatar
      tools/power turbostat: Fix /dev/cpu_dma_latency warnings · 40aafc7d
      Prarit Bhargava authored
      When running as non-root the following error is seen in turbostat:
      
      turbostat: fopen /dev/cpu_dma_latency
      : Permission denied
      
      turbostat and the man page have information on how to avoid other
      permission errors, so these can be fixed the same way.
      
      Provide better /dev/cpu_dma_latency warnings that provide instructions on
      how to avoid the error, and update the man page.
      Signed-off-by: default avatarPrarit Bhargava <prarit@redhat.com>
      Cc: linux-pm@vger.kernel.org
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      40aafc7d
    • Prarit Bhargava's avatar
      tools/power turbostat: Provide better debug messages for failed capabilities accesses · 9c085817
      Prarit Bhargava authored
      turbostat reports some capabilities access errors and not others.  Provide
      the same debug message for all errors.
      
      [lenb: remove extra quotes]
      
      Cc: David Arcari <darcari@redhat.com>
      Signed-off-by: default avatarPrarit Bhargava <prarit@redhat.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      9c085817
    • Len Brown's avatar
      tools/power turbostat: update dump of SECONDARY_TURBO_RATIO_LIMIT · 884a1f95
      Len Brown authored
      cosmetic only (but useful if you copy/paste)
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      884a1f95
    • David S. Miller's avatar
      Merge branch 'bonding-fixes' · f5e305e6
      David S. Miller authored
      Nikolay Aleksandrov says:
      
      ====================
      bonding: properly restore flags when bond changes ether type
      
      A bug was reported by syzbot[1] that causes a warning and a myriad of
      other potential issues if a bond, that is also a slave, fails to enslave a
      non-eth device. While fixing that bug I found that we have the same
      issues when such enslave passes and after that the bond changes back to
      ARPHRD_ETHER (again due to ether_setup). This set fixes all issues by
      extracting the ether_setup() sequence in a helper which does the right
      thing about bond flags when it needs to change back to ARPHRD_ETHER. It
      also adds selftests for these cases.
      
      Patch 01 adds the new bond_ether_setup helper and fixes the issues when a
      bond device changes its ether type due to successful enslave. Patch 02
      fixes the issues when it changes its ether type due to an unsuccessful
      enslave. Note we need two patches because the bugs were introduced by
      different commits. Patch 03 adds the new selftests.
      
      Due to the comment adjustment and squash, could you please review
      patch 01 again? I've kept the other acks since there were no code
      changes.
      
      v3: squash the helper patch and the first fix, adjust the comment above
          it to be explicit about the bond device, no code changes
      v2: new set, all patches are new due to new approach of fixing these bugs
      
      [1] https://syzkaller.appspot.com/bug?id=391c7b1f6522182899efba27d891f1743e8eb3ef
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f5e305e6
    • Nikolay Aleksandrov's avatar
      selftests: bonding: add tests for ether type changes · 222c94ec
      Nikolay Aleksandrov authored
      Add new network selftests for the bonding device which exercise the ether
      type changing call paths. They also test for the recent syzbot bug[1] which
      causes a warning and results in wrong device flags (IFF_SLAVE missing).
      The test adds three bond devices and a nlmon device, enslaves one of the
      bond devices to the other and then uses the nlmon device for successful
      and unsuccesful enslaves both of which change the bond ether type. Thus
      we can test for both MASTER and SLAVE flags at the same time.
      
      If the flags are properly restored we get:
      TEST: Change ether type of an enslaved bond device with unsuccessful enslave   [ OK ]
      TEST: Change ether type of an enslaved bond device with successful enslave   [ OK ]
      
      [1] https://syzkaller.appspot.com/bug?id=391c7b1f6522182899efba27d891f1743e8eb3efSigned-off-by: default avatarNikolay Aleksandrov <razor@blackwall.org>
      Reviewed-by: default avatarMichal Kubiak <michal.kubiak@intel.com>
      Acked-by: default avatarJonathan Toppins <jtoppins@redhat.com>
      Acked-by: default avatarJay Vosburgh <jay.vosburgh@canonical.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      222c94ec
    • Nikolay Aleksandrov's avatar
      bonding: restore bond's IFF_SLAVE flag if a non-eth dev enslave fails · e667d469
      Nikolay Aleksandrov authored
      syzbot reported a warning[1] where the bond device itself is a slave and
      we try to enslave a non-ethernet device as the first slave which fails
      but then in the error path when ether_setup() restores the bond device
      it also clears all flags. In my previous fix[2] I restored the
      IFF_MASTER flag, but I didn't consider the case that the bond device
      itself might also be a slave with IFF_SLAVE set, so we need to restore
      that flag as well. Use the bond_ether_setup helper which does the right
      thing and restores the bond's flags properly.
      
      Steps to reproduce using a nlmon dev:
       $ ip l add nlmon0 type nlmon
       $ ip l add bond1 type bond
       $ ip l add bond2 type bond
       $ ip l set bond1 master bond2
       $ ip l set dev nlmon0 master bond1
       $ ip -d l sh dev bond1
       22: bond1: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noqueue master bond2 state DOWN mode DEFAULT group default qlen 1000
       (now bond1's IFF_SLAVE flag is gone and we'll hit a warning[3] if we
        try to delete it)
      
      [1] https://syzkaller.appspot.com/bug?id=391c7b1f6522182899efba27d891f1743e8eb3ef
      [2] commit 7d5cd2ce ("bonding: correctly handle bonding type change on enslave failure")
      [3] example warning:
       [   27.008664] bond1: (slave nlmon0): The slave device specified does not support setting the MAC address
       [   27.008692] bond1: (slave nlmon0): Error -95 calling set_mac_address
       [   32.464639] bond1 (unregistering): Released all slaves
       [   32.464685] ------------[ cut here ]------------
       [   32.464686] WARNING: CPU: 1 PID: 2004 at net/core/dev.c:10829 unregister_netdevice_many+0x72a/0x780
       [   32.464694] Modules linked in: br_netfilter bridge bonding virtio_net
       [   32.464699] CPU: 1 PID: 2004 Comm: ip Kdump: loaded Not tainted 5.18.0-rc3+ #47
       [   32.464703] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.1-2.fc37 04/01/2014
       [   32.464704] RIP: 0010:unregister_netdevice_many+0x72a/0x780
       [   32.464707] Code: 99 fd ff ff ba 90 1a 00 00 48 c7 c6 f4 02 66 96 48 c7 c7 20 4d 35 96 c6 05 fa c7 2b 02 01 e8 be 6f 4a 00 0f 0b e9 73 fd ff ff <0f> 0b e9 5f fd ff ff 80 3d e3 c7 2b 02 00 0f 85 3b fd ff ff ba 59
       [   32.464710] RSP: 0018:ffffa006422d7820 EFLAGS: 00010206
       [   32.464712] RAX: ffff8f6e077140a0 RBX: ffffa006422d7888 RCX: 0000000000000000
       [   32.464714] RDX: ffff8f6e12edbe58 RSI: 0000000000000296 RDI: ffffffff96d4a520
       [   32.464716] RBP: ffff8f6e07714000 R08: ffffffff96d63600 R09: ffffa006422d7728
       [   32.464717] R10: 0000000000000ec0 R11: ffffffff9698c988 R12: ffff8f6e12edb140
       [   32.464719] R13: dead000000000122 R14: dead000000000100 R15: ffff8f6e12edb140
       [   32.464723] FS:  00007f297c2f1740(0000) GS:ffff8f6e5d900000(0000) knlGS:0000000000000000
       [   32.464725] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
       [   32.464726] CR2: 00007f297bf1c800 CR3: 00000000115e8000 CR4: 0000000000350ee0
       [   32.464730] Call Trace:
       [   32.464763]  <TASK>
       [   32.464767]  rtnl_dellink+0x13e/0x380
       [   32.464776]  ? cred_has_capability.isra.0+0x68/0x100
       [   32.464780]  ? __rtnl_unlock+0x33/0x60
       [   32.464783]  ? bpf_lsm_capset+0x10/0x10
       [   32.464786]  ? security_capable+0x36/0x50
       [   32.464790]  rtnetlink_rcv_msg+0x14e/0x3b0
       [   32.464792]  ? _copy_to_iter+0xb1/0x790
       [   32.464796]  ? post_alloc_hook+0xa0/0x160
       [   32.464799]  ? rtnl_calcit.isra.0+0x110/0x110
       [   32.464802]  netlink_rcv_skb+0x50/0xf0
       [   32.464806]  netlink_unicast+0x216/0x340
       [   32.464809]  netlink_sendmsg+0x23f/0x480
       [   32.464812]  sock_sendmsg+0x5e/0x60
       [   32.464815]  ____sys_sendmsg+0x22c/0x270
       [   32.464818]  ? import_iovec+0x17/0x20
       [   32.464821]  ? sendmsg_copy_msghdr+0x59/0x90
       [   32.464823]  ? do_set_pte+0xa0/0xe0
       [   32.464828]  ___sys_sendmsg+0x81/0xc0
       [   32.464832]  ? mod_objcg_state+0xc6/0x300
       [   32.464835]  ? refill_obj_stock+0xa9/0x160
       [   32.464838]  ? memcg_slab_free_hook+0x1a5/0x1f0
       [   32.464842]  __sys_sendmsg+0x49/0x80
       [   32.464847]  do_syscall_64+0x3b/0x90
       [   32.464851]  entry_SYSCALL_64_after_hwframe+0x44/0xae
       [   32.464865] RIP: 0033:0x7f297bf2e5e7
       [   32.464868] Code: 64 89 02 48 c7 c0 ff ff ff ff eb bb 0f 1f 80 00 00 00 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 89 54 24 1c 48 89 74 24 10
       [   32.464869] RSP: 002b:00007ffd96c824c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
       [   32.464872] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f297bf2e5e7
       [   32.464874] RDX: 0000000000000000 RSI: 00007ffd96c82540 RDI: 0000000000000003
       [   32.464875] RBP: 00000000640f19de R08: 0000000000000001 R09: 000000000000007c
       [   32.464876] R10: 00007f297bffabe0 R11: 0000000000000246 R12: 0000000000000001
       [   32.464877] R13: 00007ffd96c82d20 R14: 00007ffd96c82610 R15: 000055bfe38a7020
       [   32.464881]  </TASK>
       [   32.464882] ---[ end trace 0000000000000000 ]---
      
      Fixes: 7d5cd2ce ("bonding: correctly handle bonding type change on enslave failure")
      Reported-by: syzbot+9dfc3f3348729cc82277@syzkaller.appspotmail.com
      Link: https://syzkaller.appspot.com/bug?id=391c7b1f6522182899efba27d891f1743e8eb3efSigned-off-by: default avatarNikolay Aleksandrov <razor@blackwall.org>
      Reviewed-by: default avatarMichal Kubiak <michal.kubiak@intel.com>
      Acked-by: default avatarJonathan Toppins <jtoppins@redhat.com>
      Acked-by: default avatarJay Vosburgh <jay.vosburgh@canonical.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e667d469
    • Nikolay Aleksandrov's avatar
      bonding: restore IFF_MASTER/SLAVE flags on bond enslave ether type change · 9ec7eb60
      Nikolay Aleksandrov authored
      Add bond_ether_setup helper which is used to fix ether_setup() calls in the
      bonding driver. It takes care of both IFF_MASTER and IFF_SLAVE flags, the
      former is always restored and the latter only if it was set.
      If the bond enslaves non-ARPHRD_ETHER device (changes its type), then
      releases it and enslaves ARPHRD_ETHER device (changes back) then we
      use ether_setup() to restore the bond device type but it also resets its
      flags and removes IFF_MASTER and IFF_SLAVE[1]. Use the bond_ether_setup
      helper to restore both after such transition.
      
      [1] reproduce (nlmon is non-ARPHRD_ETHER):
       $ ip l add nlmon0 type nlmon
       $ ip l add bond2 type bond mode active-backup
       $ ip l set nlmon0 master bond2
       $ ip l set nlmon0 nomaster
       $ ip l add bond1 type bond
       (we use bond1 as ARPHRD_ETHER device to restore bond2's mode)
       $ ip l set bond1 master bond2
       $ ip l sh dev bond2
       37: bond2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
          link/ether be:d7:c5:40:5b:cc brd ff:ff:ff:ff:ff:ff promiscuity 0 minmtu 68 maxmtu 1500
       (notice bond2's IFF_MASTER is missing)
      
      Fixes: e36b9d16 ("bonding: clean muticast addresses when device changes type")
      Signed-off-by: default avatarNikolay Aleksandrov <razor@blackwall.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9ec7eb60
    • David S. Miller's avatar
      Merge branch 'net-renesas-rswitch-fixes' · 53515a05
      David S. Miller authored
      Yoshihiro Shimoda says:
      
      ====================
      net: renesas: rswitch: Fix rx and timestamp
      
      I got reports locally about issues on the rswitch driver.
      So, fix the issues.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      53515a05
    • Yoshihiro Shimoda's avatar
      net: renesas: rswitch: Fix GWTSDIE register handling · 2c59e993
      Yoshihiro Shimoda authored
      Since the GWCA has the TX timestamp feature, this driver
      should not disable it if one of ports is opened. So, fix it.
      Reported-by: default avatarPhong Hoang <phong.hoang.wz@renesas.com>
      Fixes: 33f5d733 ("net: renesas: rswitch: Improve TX timestamp accuracy")
      Signed-off-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2c59e993
    • Yoshihiro Shimoda's avatar
      net: renesas: rswitch: Fix the output value of quote from rswitch_rx() · e05bb97d
      Yoshihiro Shimoda authored
      If the RX descriptor doesn't have any data, the output value of quote
      from rswitch_rx() will be increased unexpectedily. So, fix it.
      Reported-by: default avatarVolodymyr Babchuk <volodymyr_babchuk@epam.com>
      Fixes: 3590918b ("net: ethernet: renesas: Add support for "Ethernet Switch"")
      Signed-off-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e05bb97d
    • Liang He's avatar
      ethernet: sun: add check for the mdesc_grab() · 90de546d
      Liang He authored
      In vnet_port_probe() and vsw_port_probe(), we should
      check the return value of mdesc_grab() as it may
      return NULL which can caused NPD bugs.
      
      Fixes: 5d01fa0c ("ldmvsw: Add ldmvsw.c driver code")
      Fixes: 43fdf274 ("[SPARC64]: Abstract out mdesc accesses for better MD update handling.")
      Signed-off-by: default avatarLiang He <windhl@126.com>
      Reviewed-by: default avatarPiotr Raczynski <piotr.raczynski@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      90de546d
    • 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
    • Jakub Kicinski's avatar
      Merge branch 'net-ipa-minor-bug-fixes' · 0c98b8bc
      Jakub Kicinski authored
      Alex Elder says:
      
      ====================
      net: ipa: minor bug fixes
      
      The four patches in this series fix some errors, though none of them
      cause any compile or runtime problems.
      
      The first changes the files included by "drivers/net/ipa/reg.h" to
      ensure everything it requires is included with the file.  It also
      stops unnecessarily including another file.  The prerequisites are
      apparently satisfied other ways, currently.
      
      The second adds two struct declarations to "gsi_reg.h", to ensure
      they're declared before they're used later in the file.  Again, it
      seems these declarations are currently resolved wherever this file
      is included.
      
      The third removes register definitions that were added for IPA v5.0
      that are not needed.  And the last updates some validity checks for
      IPA v5.0 registers.  No IPA v5.0 platforms are yet supported, so the
      issues resolved here were never harmful.
      
      Versions 2 and 3 of this series change the "Fixes" tags in patches
      so they supply legitimate commit hashes.
      ====================
      
      Link: https://lore.kernel.org/r/20230316145136.1795469-1-elder@linaro.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      0c98b8bc
    • Alex Elder's avatar
      net: ipa: fix some register validity checks · 21e8aaca
      Alex Elder authored
      A recent commit defined HW_PARAM_4 as a GSI register ID but did not
      add it to gsi_reg_id_valid() to indicate it's valid (for IPA v5.0+).
      Add version checks for the HW_PARAM_2 and INTER_EE IRQ GSI registers
      there as well.
      
      IPA v5.0 supports up to 8 source and destination resource groups.
      Update the validity check (and the comments where the register IDs
      are defined) to reflect that.  Similarly update comments and
      validity checks for the hash/cache-related registers.
      
      Note that this patch fixes an omission and constrains things
      further, but these don't technically represent bugs.
      
      Fixes: f651334e ("net: ipa: add HW_PARAM_4 GSI register")
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      21e8aaca
    • Alex Elder's avatar
      net: ipa: kill FILT_ROUT_CACHE_CFG IPA register · 786bbe50
      Alex Elder authored
      A recent commit defined a few IPA registers used for IPA v5.0+.
      One of those was a mistake.  Although the filter and router caches
      get *flushed* using a single register, they use distinct registers
      (ENDP_FILTER_CACHE_CFG and ENDP_ROUTER_CACHE_CFG) for configuration.
      
      And although there *exists* a FILT_ROUT_CACHE_CFG register, it is
      not needed in upstream code.  So get rid of definitions related to
      FILT_ROUT_CACHE_CFG, because they are not needed.
      
      Fixes: 8ba59716 ("net: ipa: define IPA v5.0+ registers")
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      786bbe50
    • Alex Elder's avatar
      net: ipa: add two missing declarations · 55c49e5c
      Alex Elder authored
      When gsi_reg_init() got added, its declaration was added to
      "gsi_reg.h" without declaring the two struct pointer types it uses.
      Add these struct declarations to "gsi_reg.h".
      
      Fixes: 3c506add ("net: ipa: introduce gsi_reg_init()")
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      55c49e5c
    • Alex Elder's avatar
      net: ipa: reg: include <linux/bug.h> · dd172d0c
      Alex Elder authored
      When "reg.h" got created, it included calls to WARN() and WARN_ON().
      Those macros are defined via <linux/bug.h>.  In addition, it uses
      is_power_of_2(), which is defined in <linux/log2.h>.  Include those
      files so IPA "reg.h" has access to all definitions it requires.
      
      Meanwhile, <linux/bits.h> is included but nothing defined therein
      is required directly in "reg.h", so get rid of that.
      
      Fixes: 81772e44 ("net: ipa: start generalizing "ipa_reg"")
      Signed-off-by: default avatarAlex Elder <elder@linaro.org>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      dd172d0c
    • Jakub Kicinski's avatar
      net: xdp: don't call notifiers during driver init · 769639c1
      Jakub Kicinski authored
      Drivers will commonly perform feature setting during init, if they use
      the xdp_set_features_flag() helper they'll likely run into an ASSERT_RTNL()
      inside call_netdevice_notifiers_info().
      
      Don't call the notifier until the device is actually registered.
      Nothing should be tracking the device until its registered and
      after its unregistration has started.
      
      Fixes: 4d5ab0ad ("net/mlx5e: take into account device reconfiguration for xdp_features flag")
      Link: https://lore.kernel.org/r/20230316220234.598091-1-kuba@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      769639c1