1. 08 Dec, 2022 2 commits
  2. 07 Dec, 2022 4 commits
  3. 06 Dec, 2022 7 commits
    • Anders Roxell's avatar
      ata: libahci_platform: ahci_platform_find_clk: oops, NULL pointer · d95d140e
      Anders Roxell authored
      When booting a arm 32-bit kernel with config CONFIG_AHCI_DWC enabled on
      a am57xx-evm board. This happens when the clock references are unnamed
      in DT, the strcmp() produces a NULL pointer dereference, see the
      following oops, NULL pointer dereference:
      
      [    4.673950] Unable to handle kernel NULL pointer dereference at virtual address 00000000
      [    4.682098] [00000000] *pgd=00000000
      [    4.685699] Internal error: Oops: 5 [#1] SMP ARM
      [    4.690338] Modules linked in:
      [    4.693420] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.1.0-rc7 #1
      [    4.699615] Hardware name: Generic DRA74X (Flattened Device Tree)
      [    4.705749] PC is at strcmp+0x0/0x34
      [    4.709350] LR is at ahci_platform_find_clk+0x3c/0x5c
      [    4.714416] pc : [<c130c494>]    lr : [<c0c230e0>]    psr: 20000013
      [    4.720703] sp : f000dda8  ip : 00000001  fp : c29b1840
      [    4.725952] r10: 00000020  r9 : c1b23380  r8 : c1b23368
      [    4.731201] r7 : c1ab4cc4  r6 : 00000001  r5 : c3c66040  r4 : 00000000
      [    4.737762] r3 : 00000080  r2 : 00000080  r1 : c1ab4cc4  r0 : 00000000
      [...]
      [    4.998870]  strcmp from ahci_platform_find_clk+0x3c/0x5c
      [    5.004302]  ahci_platform_find_clk from ahci_dwc_probe+0x1f0/0x54c
      [    5.010589]  ahci_dwc_probe from platform_probe+0x64/0xc0
      [    5.016021]  platform_probe from really_probe+0xe8/0x41c
      [    5.021362]  really_probe from __driver_probe_device+0xa4/0x204
      [    5.027313]  __driver_probe_device from driver_probe_device+0x38/0xc8
      [    5.033782]  driver_probe_device from __driver_attach+0xb4/0x1ec
      [    5.039825]  __driver_attach from bus_for_each_dev+0x78/0xb8
      [    5.045532]  bus_for_each_dev from bus_add_driver+0x17c/0x220
      [    5.051300]  bus_add_driver from driver_register+0x90/0x124
      [    5.056915]  driver_register from do_one_initcall+0x48/0x1e8
      [    5.062591]  do_one_initcall from kernel_init_freeable+0x1cc/0x234
      [    5.068817]  kernel_init_freeable from kernel_init+0x20/0x13c
      [    5.074584]  kernel_init from ret_from_fork+0x14/0x2c
      [    5.079681] Exception stack(0xf000dfb0 to 0xf000dff8)
      [    5.084747] dfa0:                                     00000000 00000000 00000000 00000000
      [    5.092956] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      [    5.101165] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000
      [    5.107818] Code: e5e32001 e3520000 1afffffb e12fff1e (e4d03001)
      [    5.114013] ---[ end trace 0000000000000000 ]---
      
      Add an extra check in the if-statement if hpriv-clks[i].id.
      
      Fixes: 6ce73f3a ("ata: libahci_platform: Add function returning a clock-handle by id")
      Suggested-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarAnders Roxell <anders.roxell@linaro.org>
      Reviewed-by: default avatarSerge Semin <fancer.lancer@gmail.com>
      Signed-off-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
      d95d140e
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 8ed710da
      Linus Torvalds authored
      Pull arm64 fix from Catalin Marinas:
       "Revert the dropping of the cache invalidation from the arm64
        arch_dma_prep_coherent() as it caused a regression in the
        qcom_q6v5_mss remoteproc driver.
      
        The driver is already buggy but the original arm64 change made
        the problem obvious. The change will be re-introduced once the
        driver is fixed"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        Revert "arm64: dma: Drop cache invalidation from arch_dma_prep_coherent()"
      8ed710da
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 5b3e0cd8
      Linus Torvalds authored
      Pull kvm fixes from Paolo Bonzini:
       "Unless anything comes from the ARM side, this should be the last pull
        request for this release - and it's mostly documentation:
      
         - Document the interaction between KVM_CAP_HALT_POLL and halt_poll_ns
      
         - s390: fix multi-epoch extension in nested guests
      
         - x86: fix uninitialized variable on nested triple fault"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: Document the interaction between KVM_CAP_HALT_POLL and halt_poll_ns
        KVM: Move halt-polling documentation into common directory
        KVM: x86: fix uninitialized variable use on KVM_REQ_TRIPLE_FAULT
        KVM: s390: vsie: Fix the initialization of the epoch extension (epdx) field
      5b3e0cd8
    • Linus Torvalds's avatar
      Merge tag 'for-linus-xsa-6.1-rc9-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · b71101d6
      Linus Torvalds authored
      Pull xen fixes from Juergen Gross:
       "Two zero-day fixes for the xen-netback driver (XSA-423 and XSA-424)"
      
      * tag 'for-linus-xsa-6.1-rc9-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen/netback: don't call kfree_skb() with interrupts disabled
        xen/netback: Ensure protocol headers don't fall in the non-linear area
      b71101d6
    • Will Deacon's avatar
      Revert "arm64: dma: Drop cache invalidation from arch_dma_prep_coherent()" · b7d9aae4
      Will Deacon authored
      This reverts commit c44094ee.
      
      Although the semantics of the DMA API require only a clean operation
      here, it turns out that the Qualcomm 'qcom_q6v5_mss' remoteproc driver
      (ab)uses the DMA API for transferring the modem firmware to the secure
      world via calls to Trustzone [1].
      
      Once the firmware buffer has changed hands, _any_ access from the
      non-secure side (i.e. Linux) will be detected on the bus and result in a
      full system reset [2]. Although this is possible even with this revert
      in place (due to speculative reads via the cacheable linear alias of
      memory), anecdotally the problem occurs considerably more frequently
      when the lines have not been invalidated, assumedly due to some
      micro-architectural interactions with the cache hierarchy.
      
      Revert the offending change for now, along with a comment, so that the
      Qualcomm developers have time to fix the driver [3] to use a firmware
      buffer which does not have a cacheable alias in the linear map.
      
      Link: https://lore.kernel.org/r/20221114110329.68413-1-manivannan.sadhasivam@linaro.org [1]
      Link: https://lore.kernel.org/r/CAMi1Hd3H2k1J8hJ6e-Miy5+nVDNzv6qQ3nN-9929B0GbHJkXEg@mail.gmail.com/ [2]
      Link: https://lore.kernel.org/r/20221206092152.GD15486@thinkpad [2]
      Reported-by: default avatarAmit Pundir <amit.pundir@linaro.org>
      Reported-by: default avatarManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
      Cc: Thorsten Leemhuis <regressions@leemhuis.info>
      Cc: Sibi Sankar <quic_sibis@quicinc.com>
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      Acked-by: default avatarManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
      Link: https://lore.kernel.org/r/20221206103403.646-1-will@kernel.orgSigned-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      b7d9aae4
    • Juergen Gross's avatar
      xen/netback: don't call kfree_skb() with interrupts disabled · 74e7e1ef
      Juergen Gross authored
      It is not allowed to call kfree_skb() from hardware interrupt
      context or with interrupts being disabled. So remove kfree_skb()
      from the spin_lock_irqsave() section and use the already existing
      "drop" label in xenvif_start_xmit() for dropping the SKB. At the
      same time replace the dev_kfree_skb() call there with a call of
      dev_kfree_skb_any(), as xenvif_start_xmit() can be called with
      disabled interrupts.
      
      This is XSA-424 / CVE-2022-42328 / CVE-2022-42329.
      
      Fixes: be81992f ("xen/netback: don't queue unlimited number of packages")
      Reported-by: default avatarYang Yingliang <yangyingliang@huawei.com>
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      Reviewed-by: default avatarJan Beulich <jbeulich@suse.com>
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      74e7e1ef
    • Ross Lagerwall's avatar
      xen/netback: Ensure protocol headers don't fall in the non-linear area · ad7f402a
      Ross Lagerwall authored
      In some cases, the frontend may send a packet where the protocol headers
      are spread across multiple slots. This would result in netback creating
      an skb where the protocol headers spill over into the non-linear area.
      Some drivers and NICs don't handle this properly resulting in an
      interface reset or worse.
      
      This issue was introduced by the removal of an unconditional skb pull in
      the tx path to improve performance.  Fix this without reintroducing the
      pull by setting up grant copy ops for as many slots as needed to reach
      the XEN_NETBACK_TX_COPY_LEN size. Adjust the rest of the code to handle
      multiple copy operations per skb.
      
      This is XSA-423 / CVE-2022-3643.
      
      Fixes: 7e5d7753 ("xen-netback: remove unconditional __pskb_pull_tail() in guest Tx path")
      Signed-off-by: default avatarRoss Lagerwall <ross.lagerwall@citrix.com>
      Reviewed-by: default avatarPaul Durrant <paul@xen.org>
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      ad7f402a
  4. 05 Dec, 2022 3 commits
    • Linus Torvalds's avatar
      proc: proc_skip_spaces() shouldn't think it is working on C strings · bce93322
      Linus Torvalds authored
      proc_skip_spaces() seems to think it is working on C strings, and ends
      up being just a wrapper around skip_spaces() with a really odd calling
      convention.
      
      Instead of basing it on skip_spaces(), it should have looked more like
      proc_skip_char(), which really is the exact same function (except it
      skips a particular character, rather than whitespace).  So use that as
      inspiration, odd coding and all.
      
      Now the calling convention actually makes sense and works for the
      intended purpose.
      Reported-and-tested-by: default avatarKyle Zeng <zengyhkyle@gmail.com>
      Acked-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      bce93322
    • Linus Torvalds's avatar
      proc: avoid integer type confusion in get_proc_long · e6cfaf34
      Linus Torvalds authored
      proc_get_long() is passed a size_t, but then assigns it to an 'int'
      variable for the length.  Let's not do that, even if our IO paths are
      limited to MAX_RW_COUNT (exactly because of these kinds of type errors).
      
      So do the proper test in the rigth type.
      Reported-by: default avatarKyle Zeng <zengyhkyle@gmail.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e6cfaf34
    • Jann Horn's avatar
      ipc/sem: Fix dangling sem_array access in semtimedop race · b52be557
      Jann Horn authored
      When __do_semtimedop() goes to sleep because it has to wait for a
      semaphore value becoming zero or becoming bigger than some threshold, it
      links the on-stack sem_queue to the sem_array, then goes to sleep
      without holding a reference on the sem_array.
      
      When __do_semtimedop() comes back out of sleep, one of two things must
      happen:
      
       a) We prove that the on-stack sem_queue has been disconnected from the
          (possibly freed) sem_array, making it safe to return from the stack
          frame that the sem_queue exists in.
      
       b) We stabilize our reference to the sem_array, lock the sem_array, and
          detach the sem_queue from the sem_array ourselves.
      
      sem_array has RCU lifetime, so for case (b), the reference can be
      stabilized inside an RCU read-side critical section by locklessly
      checking whether the sem_queue is still connected to the sem_array.
      
      However, the current code does the lockless check on sem_queue before
      starting an RCU read-side critical section, so the result of the
      lockless check immediately becomes useless.
      
      Fix it by doing rcu_read_lock() before the lockless check.  Now RCU
      ensures that if we observe the object being on our queue, the object
      can't be freed until rcu_read_unlock().
      
      This bug is only hittable on kernel builds with full preemption support
      (either CONFIG_PREEMPT or PREEMPT_DYNAMIC with preempt=full).
      
      Fixes: 370b262c ("ipc/sem: avoid idr tree lookup for interrupted semop")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJann Horn <jannh@google.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b52be557
  5. 04 Dec, 2022 7 commits
  6. 03 Dec, 2022 5 commits
    • Linus Torvalds's avatar
      Merge tag 'i2c-for-6.1-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · c2bf05db
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
       "A power state fix in the core for ACPI devices, a regression fix
        regarding bus recovery for the cadence driver, a DMA handling fix for
        the imx driver, and two error path fixes (npcm7xx and qcom-geni)"
      
      * tag 'i2c-for-6.1-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: imx: Only DMA messages with I2C_M_DMA_SAFE flag set
        i2c: qcom-geni: fix error return code in geni_i2c_gpi_xfer
        i2c: cadence: Fix regression with bus recovery
        i2c: Restore initial power state if probe fails
        i2c: npcm7xx: Fix error handling in npcm_i2c_init()
      c2bf05db
    • Linus Torvalds's avatar
      Merge tag 'dax-fixes-6.1-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm · 6085bc95
      Linus Torvalds authored
      Pull dax fixes from Dan Williams:
       "A few bug fixes around the handling of "Soft Reserved" memory and
        memory tiering information.
      
        Linux is starting to enounter more real world systems that deploy an
        ACPI HMAT to describe different performance classes of memory, as well
        the "special purpose" (Linux "Soft Reserved") designation from EFI.
      
        These fixes result from that testing.
      
        It has all appeared in -next for a while with no known issues.
      
         - Fix duplicate overlapping device-dax instances for HMAT described
           "Soft Reserved" Memory
      
         - Fix missing node targets in the sysfs representation of memory
           tiers
      
         - Remove a confusing variable initialization"
      
      * tag 'dax-fixes-6.1-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
        device-dax: Fix duplicate 'hmem' device registration
        ACPI: HMAT: Fix initiator registration for single-initiator systems
        ACPI: HMAT: remove unnecessary variable initialization
      6085bc95
    • Linus Torvalds's avatar
      Merge tag 'block-6.1-2022-12-02' of git://git.kernel.dk/linux · 97ee9d1c
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "Just a small NVMe merge for this week, fixing protection of the name
        space list, and a missing clear of a reserved field when unused"
      
      * tag 'block-6.1-2022-12-02' of git://git.kernel.dk/linux:
        nvme: fix SRCU protection of nvme_ns_head list
        nvme-pci: clear the prp2 field when not used
      97ee9d1c
    • Linus Torvalds's avatar
      Merge tag 'pinctrl-v6.1-5' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · 63050a5c
      Linus Torvalds authored
      Pull pin control fixes from Linus Walleij:
       "Three driver fixes. The Intel fix looks like the most important.
      
         - Fix a potential divide by zero in pinctrl-singe (OMAP and
           HiSilicon)
      
         - Disable IRQs on startup in the Mediatek driver. This is a classic,
           we should be looking out for this more.
      
         - Save and restore pins in 'direct IRQ' mode in the Intel driver,
           this works around firmware bugs"
      
      * tag 'pinctrl-v6.1-5' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
        pinctrl: intel: Save and restore pins in "direct IRQ" mode
        pinctrl: meditatek: Startup with the IRQs disabled
        pinctrl: single: Fix potential division by zero
      63050a5c
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-6.1-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 0e15c3c7
      Linus Torvalds authored
      Pull RISC-V fixes from Palmer Dabbelt:
      
       - build fix for the NR_CPUS Kconfig SBI version dependency
      
       - fixes to early memory initialization, to fix page permissions in EFI
         and post-initmem-free
      
       - build fix for the VDSO, to avoid trying to profile the VDSO functions
      
       - fixes for kexec crash handling, to fix multi-core and interrupt
         related initialization inside the crash kernel
      
       - fix for a race condition when handling multiple concurrect kernel
         stack overflows
      
      * tag 'riscv-for-linus-6.1-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        riscv: kexec: Fixup crash_smp_send_stop without multi cores
        riscv: kexec: Fixup irq controller broken in kexec crash path
        riscv: mm: Proper page permissions after initmem free
        riscv: vdso: fix section overlapping under some conditions
        riscv: fix race when vmap stack overflow
        riscv: Sync efi page table's kernel mappings before switching
        riscv: Fix NR_CPUS range conditions
      0e15c3c7
  7. 02 Dec, 2022 12 commits
    • Linus Torvalds's avatar
      Merge tag 'mmc-v6.1-rc5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · 2df2adc3
      Linus Torvalds authored
      Pull MMC fixes from Ulf Hansson:
       "MMC core:
         - Fix ambiguous TRIM and DISCARD args
         - Fix removal of debugfs file for mmc_test
      
        MMC host:
         - mtk-sd: Add missing clk_disable_unprepare() in an error path
         - sdhci: Fix I/O voltage switch delay for UHS-I SD cards
         - sdhci-esdhc-imx: Fix CQHCI exit halt state check
         - sdhci-sprd: Fix voltage switch"
      
      * tag 'mmc-v6.1-rc5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
        mmc: sdhci-sprd: Fix no reset data and command after voltage switch
        mmc: sdhci: Fix voltage switch delay
        mmc: mtk-sd: Fix missing clk_disable_unprepare in msdc_of_clock_parse()
        mmc: mmc_test: Fix removal of debugfs file
        mmc: sdhci-esdhc-imx: correct CQHCI exit halt state check
        mmc: core: Fix ambiguous TRIM and DISCARD arg
      2df2adc3
    • Linus Torvalds's avatar
      Merge tag 'iommu-fixes-v6.1-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · f66f62f8
      Linus Torvalds authored
      Pull iommu fixes from Joerg Roedel:
       "Intel VT-d fixes:
      
         - IO/TLB flush fix
      
         - Various pci_dev refcount fixes"
      
      * tag 'iommu-fixes-v6.1-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        iommu/vt-d: Fix PCI device refcount leak in dmar_dev_scope_init()
        iommu/vt-d: Fix PCI device refcount leak in has_external_pci()
        iommu/vt-d: Fix PCI device refcount leak in prq_event_thread()
        iommu/vt-d: Add a fix for devices need extra dtlb flush
      f66f62f8
    • Pawan Gupta's avatar
      x86/bugs: Make sure MSR_SPEC_CTRL is updated properly upon resume from S3 · 66065157
      Pawan Gupta authored
      The "force" argument to write_spec_ctrl_current() is currently ambiguous
      as it does not guarantee the MSR write. This is due to the optimization
      that writes to the MSR happen only when the new value differs from the
      cached value.
      
      This is fine in most cases, but breaks for S3 resume when the cached MSR
      value gets out of sync with the hardware MSR value due to S3 resetting
      it.
      
      When x86_spec_ctrl_current is same as x86_spec_ctrl_base, the MSR write
      is skipped. Which results in SPEC_CTRL mitigations not getting restored.
      
      Move the MSR write from write_spec_ctrl_current() to a new function that
      unconditionally writes to the MSR. Update the callers accordingly and
      rename functions.
      
        [ bp: Rework a bit. ]
      
      Fixes: caa0ff24 ("x86/bugs: Keep a per-CPU IA32_SPEC_CTRL value")
      Suggested-by: default avatarBorislav Petkov <bp@alien8.de>
      Signed-off-by: default avatarPawan Gupta <pawan.kumar.gupta@linux.intel.com>
      Signed-off-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: <stable@kernel.org>
      Link: https://lore.kernel.org/r/806d39b0bfec2fe8f50dc5446dff20f5bb24a959.1669821572.git.pawan.kumar.gupta@linux.intel.comSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      66065157
    • Zhang Xiaoxu's avatar
      Input: raydium_ts_i2c - fix memory leak in raydium_i2c_send() · 8c9a5993
      Zhang Xiaoxu authored
      There is a kmemleak when test the raydium_i2c_ts with bpf mock device:
      
        unreferenced object 0xffff88812d3675a0 (size 8):
          comm "python3", pid 349, jiffies 4294741067 (age 95.695s)
          hex dump (first 8 bytes):
            11 0e 10 c0 01 00 04 00                          ........
          backtrace:
            [<0000000068427125>] __kmalloc+0x46/0x1b0
            [<0000000090180f91>] raydium_i2c_send+0xd4/0x2bf [raydium_i2c_ts]
            [<000000006e631aee>] raydium_i2c_initialize.cold+0xbc/0x3e4 [raydium_i2c_ts]
            [<00000000dc6fcf38>] raydium_i2c_probe+0x3cd/0x6bc [raydium_i2c_ts]
            [<00000000a310de16>] i2c_device_probe+0x651/0x680
            [<00000000f5a96bf3>] really_probe+0x17c/0x3f0
            [<00000000096ba499>] __driver_probe_device+0xe3/0x170
            [<00000000c5acb4d9>] driver_probe_device+0x49/0x120
            [<00000000264fe082>] __device_attach_driver+0xf7/0x150
            [<00000000f919423c>] bus_for_each_drv+0x114/0x180
            [<00000000e067feca>] __device_attach+0x1e5/0x2d0
            [<0000000054301fc2>] bus_probe_device+0x126/0x140
            [<00000000aad93b22>] device_add+0x810/0x1130
            [<00000000c086a53f>] i2c_new_client_device+0x352/0x4e0
            [<000000003c2c248c>] of_i2c_register_device+0xf1/0x110
            [<00000000ffec4177>] of_i2c_notify+0x100/0x160
        unreferenced object 0xffff88812d3675c8 (size 8):
          comm "python3", pid 349, jiffies 4294741070 (age 95.692s)
          hex dump (first 8 bytes):
            22 00 36 2d 81 88 ff ff                          ".6-....
          backtrace:
            [<0000000068427125>] __kmalloc+0x46/0x1b0
            [<0000000090180f91>] raydium_i2c_send+0xd4/0x2bf [raydium_i2c_ts]
            [<000000001d5c9620>] raydium_i2c_initialize.cold+0x223/0x3e4 [raydium_i2c_ts]
            [<00000000dc6fcf38>] raydium_i2c_probe+0x3cd/0x6bc [raydium_i2c_ts]
            [<00000000a310de16>] i2c_device_probe+0x651/0x680
            [<00000000f5a96bf3>] really_probe+0x17c/0x3f0
            [<00000000096ba499>] __driver_probe_device+0xe3/0x170
            [<00000000c5acb4d9>] driver_probe_device+0x49/0x120
            [<00000000264fe082>] __device_attach_driver+0xf7/0x150
            [<00000000f919423c>] bus_for_each_drv+0x114/0x180
            [<00000000e067feca>] __device_attach+0x1e5/0x2d0
            [<0000000054301fc2>] bus_probe_device+0x126/0x140
            [<00000000aad93b22>] device_add+0x810/0x1130
            [<00000000c086a53f>] i2c_new_client_device+0x352/0x4e0
            [<000000003c2c248c>] of_i2c_register_device+0xf1/0x110
            [<00000000ffec4177>] of_i2c_notify+0x100/0x160
      
      After BANK_SWITCH command from i2c BUS, no matter success or error
      happened, the tx_buf should be freed.
      
      Fixes: 3b384bd6 ("Input: raydium_ts_i2c - do not split tx transactions")
      Signed-off-by: default avatarZhang Xiaoxu <zhangxiaoxu5@huawei.com>
      Link: https://lore.kernel.org/r/20221202103412.2120169-1-zhangxiaoxu5@huawei.com
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
      8c9a5993
    • Linus Torvalds's avatar
      Merge tag 'sound-6.1-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · a1e9185d
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Likely the last piece for 6.1; the only significant fixes are ASoC
        core ops fixes, while others are device-specific (rather minor) fixes
        in ASoC and FireWire drivers.
      
        All appear safe enough to take as a late stage material"
      
      * tag 'sound-6.1-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: dice: fix regression for Lexicon I-ONIX FW810S
        ASoC: cs42l51: Correct PGA Volume minimum value
        ASoC: ops: Correct bounds check for second channel on SX controls
        ASoC: tlv320adc3xxx: Fix build error for implicit function declaration
        ASoC: ops: Check bounds for second channel in snd_soc_put_volsw_sx()
        ASoC: ops: Fix bounds check for _sx controls
        ASoC: fsl_micfil: explicitly clear CHnF flags
        ASoC: fsl_micfil: explicitly clear software reset bit
      a1e9185d
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2022-12-02' of git://anongit.freedesktop.org/drm/drm · c290db01
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Things do seem to have finally settled down, just four i915 and one
        amdgpu this week. Probably won't have much for next week if you do
        push rc8 out.
      
        i915:
         - Fix dram info readout
         - Remove non-existent pipes from bigjoiner pipe mask
         - Fix negative value passed as remaining time
         - Never return 0 if not all requests retired
      
        amdgpu:
         - VCN fix for vangogh"
      
      * tag 'drm-fixes-2022-12-02' of git://anongit.freedesktop.org/drm/drm:
        drm/amdgpu: enable Vangogh VCN indirect sram mode
        drm/i915: Never return 0 if not all requests retired
        drm/i915: Fix negative value passed as remaining time
        drm/i915: Remove non-existent pipes from bigjoiner pipe mask
        drm/i915/mtl: Fix dram info readout
      c290db01
    • Linus Torvalds's avatar
      Merge tag 'mm-hotfixes-stable-2022-12-02' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm · bdaa78c6
      Linus Torvalds authored
      Pull misc hotfixes from Andrew Morton:
       "15 hotfixes,  11 marked cc:stable.
      
        Only three or four of the latter address post-6.0 issues, which is
        hopefully a sign that things are converging"
      
      * tag 'mm-hotfixes-stable-2022-12-02' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
        revert "kbuild: fix -Wimplicit-function-declaration in license_is_gpl_compatible"
        Kconfig.debug: provide a little extra FRAME_WARN leeway when KASAN is enabled
        drm/amdgpu: temporarily disable broken Clang builds due to blown stack-frame
        mm/khugepaged: invoke MMU notifiers in shmem/file collapse paths
        mm/khugepaged: fix GUP-fast interaction by sending IPI
        mm/khugepaged: take the right locks for page table retraction
        mm: migrate: fix THP's mapcount on isolation
        mm: introduce arch_has_hw_nonleaf_pmd_young()
        mm: add dummy pmd_young() for architectures not having it
        mm/damon/sysfs: fix wrong empty schemes assumption under online tuning in damon_sysfs_set_schemes()
        tools/vm/slabinfo-gnuplot: use "grep -E" instead of "egrep"
        nilfs2: fix NULL pointer dereference in nilfs_palloc_commit_free_entry()
        hugetlb: don't delete vma_lock in hugetlb MADV_DONTNEED processing
        madvise: use zap_page_range_single for madvise dontneed
        mm: replace VM_WARN_ON to pr_warn if the node is offline with __GFP_THISNODE
      bdaa78c6
    • Linus Torvalds's avatar
      v4l2: don't fall back to follow_pfn() if pin_user_pages_fast() fails · 6647e76a
      Linus Torvalds authored
      The V4L2_MEMORY_USERPTR interface is long deprecated and shouldn't be
      used (and is discouraged for any modern v4l drivers).  And Seth Jenkins
      points out that the fallback to VM_PFNMAP/VM_IO is fundamentally racy
      and dangerous.
      
      Note that it's not even a case that should trigger, since any normal
      user pointer logic ends up just using the pin_user_pages_fast() call
      that does the proper page reference counting.  That's not the problem
      case, only if you try to use special device mappings do you have any
      issues.
      
      Normally I'd just remove this during the merge window, but since Seth
      pointed out the problem cases, we really want to know as soon as
      possible if there are actually any users of this odd special case of a
      legacy interface.  Neither Hans nor Mauro seem to think that such
      mis-uses of the old legacy interface should exist.  As Mauro says:
      
       "See, V4L2 has actually 4 streaming APIs:
              - Kernel-allocated mmap (usually referred simply as just mmap);
              - USERPTR mmap;
              - read();
              - dmabuf;
      
        The USERPTR is one of the oldest way to use it, coming from V4L
        version 1 times, and by far the least used one"
      
      And Hans chimed in on the USERPTR interface:
      
       "To be honest, I wouldn't mind if it goes away completely, but that's a
        bit of a pipe dream right now"
      
      but while removing this legacy interface entirely may be a pipe dream we
      can at least try to remove the unlikely (and actively broken) case of
      using special device mappings for USERPTR accesses.
      
      This replaces it with a WARN_ONCE() that we can remove once we've
      hopefully confirmed that no actual users exist.
      
      NOTE! Longer term, this means that a 'struct frame_vector' only ever
      contains proper page pointers, and all the games we have with converting
      them to pages can go away (grep for 'frame_vector_to_pages()' and the
      uses of 'vec->is_pfns').  But this is just the first step, to verify
      that this code really is all dead, and do so as quickly as possible.
      Reported-by: default avatarSeth Jenkins <sethjenkins@google.com>
      Acked-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
      Acked-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
      Cc: David Hildenbrand <david@redhat.com>
      Cc: Jan Kara <jack@suse.cz>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6647e76a
    • David Matlack's avatar
      KVM: Document the interaction between KVM_CAP_HALT_POLL and halt_poll_ns · 34e30ebb
      David Matlack authored
      Clarify the existing documentation about how KVM_CAP_HALT_POLL and
      halt_poll_ns interact to make it clear that VMs using KVM_CAP_HALT_POLL
      ignore halt_poll_ns.
      Signed-off-by: default avatarDavid Matlack <dmatlack@google.com>
      Message-Id: <20221201195249.3369720-3-dmatlack@google.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      34e30ebb
    • David Matlack's avatar
      KVM: Move halt-polling documentation into common directory · b8b43a4c
      David Matlack authored
      Move halt-polling.rst into the common KVM documentation directory and
      out of the x86-specific directory. Halt-polling is a common feature and
      the existing documentation is already written as such.
      Signed-off-by: default avatarDavid Matlack <dmatlack@google.com>
      Message-Id: <20221201195249.3369720-2-dmatlack@google.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      b8b43a4c
    • Jens Axboe's avatar
      Merge tag 'nvme-6.1-2022-01-02' of git://git.infradead.org/nvme into block-6.1 · d0f411c0
      Jens Axboe authored
      Pull NVMe fixes from Christoph:
      
      "nvme fixes for Linux 6.1
      
       - fix SRCU protection of nvme_ns_head list (Caleb Sander)
       - clear the prp2 field when not used (Lei Rao)"
      
      * tag 'nvme-6.1-2022-01-02' of git://git.infradead.org/nvme:
        nvme: fix SRCU protection of nvme_ns_head list
        nvme-pci: clear the prp2 field when not used
      d0f411c0
    • Xiongfeng Wang's avatar
      iommu/vt-d: Fix PCI device refcount leak in dmar_dev_scope_init() · 4bedbbd7
      Xiongfeng Wang authored
      for_each_pci_dev() is implemented by pci_get_device(). The comment of
      pci_get_device() says that it will increase the reference count for the
      returned pci_dev and also decrease the reference count for the input
      pci_dev @from if it is not NULL.
      
      If we break for_each_pci_dev() loop with pdev not NULL, we need to call
      pci_dev_put() to decrease the reference count. Add the missing
      pci_dev_put() for the error path to avoid reference count leak.
      
      Fixes: 2e455289 ("iommu/vt-d: Unify the way to process DMAR device scope array")
      Signed-off-by: default avatarXiongfeng Wang <wangxiongfeng2@huawei.com>
      Link: https://lore.kernel.org/r/20221121113649.190393-3-wangxiongfeng2@huawei.comSigned-off-by: default avatarLu Baolu <baolu.lu@linux.intel.com>
      Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      4bedbbd7