1. 11 Dec, 2022 1 commit
    • Jason Gunthorpe's avatar
      RDMA: Add missed netdev_put() for the netdevice_tracker · e42f9c2e
      Jason Gunthorpe authored
      The netdev core will detect if any untracked puts are done on tracked
      pointers and throw refcount warnings:
      
        refcount_t: decrement hit 0; leaking memory.
        WARNING: CPU: 1 PID: 33 at lib/refcount.c:31 refcount_warn_saturate+0x1d7/0x1f0 lib/refcount.c:31
        Modules linked in:
        CPU: 1 PID: 33 Comm: kworker/u4:2 Not tainted 6.1.0-rc8-next-20221207-syzkaller #0
        Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
        Workqueue: ib-unreg-wq ib_unregister_work
        RIP: 0010:refcount_warn_saturate+0x1d7/0x1f0 lib/refcount.c:31
        Code: 05 5a 60 51 0a 01 e8 35 0a b5 05 0f 0b e9 d3 fe ff ff e8 6c 9b 75 fd 48 c7 c7 c0 6d a6 8a c6 05 37 60 51 0a 01 e8 16 0a b5 05 <0f> 0b e9 b4 fe
        +ff ff 48 89 ef e8 5a b5 c3 fd e9 5c fe ff ff 0f 1f
        RSP: 0018:ffffc90000aa7b30 EFLAGS: 00010082
        RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
        RDX: ffff8880172f9d40 RSI: ffffffff8166b1dc RDI: fffff52000154f58
        RBP: ffff88807906c600 R08: 0000000000000005 R09: 0000000000000000
        R10: 0000000080000001 R11: 0000000000000000 R12: 1ffff92000154f6b
        R13: 0000000000000000 R14: ffff88807906c600 R15: ffff888046894000
        FS:  0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
        CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
        CR2: 00007ffe350a8ff8 CR3: 000000007a9e7000 CR4: 00000000003526e0
        DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
        DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
        Call Trace:
         <TASK>
         __refcount_dec include/linux/refcount.h:344 [inline]
         refcount_dec include/linux/refcount.h:359 [inline]
         ref_tracker_free+0x539/0x6b0 lib/ref_tracker.c:118
         netdev_tracker_free include/linux/netdevice.h:4039 [inline]
         netdev_put include/linux/netdevice.h:4056 [inline]
         dev_put include/linux/netdevice.h:4082 [inline]
         free_netdevs+0x1f8/0x470 drivers/infiniband/core/device.c:2204
         __ib_unregister_device+0xa0/0x1a0 drivers/infiniband/core/device.c:1478
         ib_unregister_work+0x19/0x30 drivers/infiniband/core/device.c:1586
         process_one_work+0x9bf/0x1710 kernel/workqueue.c:2289
         worker_thread+0x669/0x1090 kernel/workqueue.c:2436
         kthread+0x2e8/0x3a0 kernel/kthread.c:376
         ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
      
      So change the missed dev_put for pdata->netdev to also follow the tracker.
      
      Fixes: 09f530f0 ("RDMA: Add netdevice_tracker to ib_device_set_netdev()")
      Reported-by: syzbot+3fd8326d9a0812d19218@syzkaller.appspotmail.com
      Reported-by: syzbot+a1ed8ffe3121380cd5dd@syzkaller.appspotmail.com
      Reported-by: syzbot+8d0a099c8a6d1e4e601c@syzkaller.appspotmail.com
      Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
      Link: https://lore.kernel.org/r/0-v1-e99919867b8d+1e2-netdev_tracker2_jgg@nvidia.comSigned-off-by: default avatarLeon Romanovsky <leon@kernel.org>
      e42f9c2e
  2. 09 Dec, 2022 13 commits
  3. 08 Dec, 2022 1 commit
  4. 07 Dec, 2022 8 commits
  5. 04 Dec, 2022 11 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 1 commit
    • 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