1. 01 Nov, 2021 10 commits
    • Linus Torvalds's avatar
      Merge tag 'for-5.16/passthrough-flag-2021-10-29' of git://git.kernel.dk/linux-block · 71ae4262
      Linus Torvalds authored
      Pull QUEUE_FLAG_SCSI_PASSTHROUGH removal from Jens Axboe:
       "This contains a series leading to the removal of the
        QUEUE_FLAG_SCSI_PASSTHROUGH queue flag"
      
      * tag 'for-5.16/passthrough-flag-2021-10-29' of git://git.kernel.dk/linux-block:
        block: remove blk_{get,put}_request
        block: remove QUEUE_FLAG_SCSI_PASSTHROUGH
        block: remove the initialize_rq_fn blk_mq_ops method
        scsi: add a scsi_alloc_request helper
        bsg-lib: initialize the bsg_job in bsg_transport_sg_io_fn
        nfsd/blocklayout: use ->get_unique_id instead of sending SCSI commands
        sd: implement ->get_unique_id
        block: add a ->get_unique_id method
      71ae4262
    • Linus Torvalds's avatar
      Merge tag 'for-5.16/cdrom-2021-10-29' of git://git.kernel.dk/linux-block · 737f1cd8
      Linus Torvalds authored
      Pull CDROM updates from Jens Axboe:
       "On behalf of Phillip, here are the CDROM updates for the 5.16-rc1
        merge window:
      
         - Add ioctl for improved media change detection (Lukas)
      
         - Reformat some documentation (Phillip)
      
         - Redundant variable removal (luo)"
      
      * tag 'for-5.16/cdrom-2021-10-29' of git://git.kernel.dk/linux-block:
        cdrom: Remove redundant variable and its assignment
        cdrom: docs: reformat table in Documentation/userspace-api/ioctl/cdrom.rst
        drivers/cdrom: improved ioctl for media change detection
      737f1cd8
    • Linus Torvalds's avatar
      Merge tag 'for-5.16/scsi-ma-2021-10-29' of git://git.kernel.dk/linux-block · fcaec17b
      Linus Torvalds authored
      Pull SCSI multi-actuator support from Jens Axboe:
       "This adds SCSI support for the recently merged block multi-actuator
        support. Since this was sitting on top of the block tree, the SCSI
        side asked me to queue it up."
      
      * tag 'for-5.16/scsi-ma-2021-10-29' of git://git.kernel.dk/linux-block:
        doc: Fix typo in request queue sysfs documentation
        doc: document sysfs queue/independent_access_ranges attributes
        libata: support concurrent positioning ranges log
        scsi: sd: add concurrent positioning ranges support
      fcaec17b
    • Linus Torvalds's avatar
      Merge tag 'for-5.16/bdev-size-2021-10-29' of git://git.kernel.dk/linux-block · 3f01727f
      Linus Torvalds authored
      Pull bdev size cleanups from Jens Axboe:
       "Clean up the bdev size handling with new bdev_nr_bytes() helper"
      
      * tag 'for-5.16/bdev-size-2021-10-29' of git://git.kernel.dk/linux-block: (34 commits)
        partitions/ibm: use bdev_nr_sectors instead of open coding it
        partitions/efi: use bdev_nr_bytes instead of open coding it
        block/ioctl: use bdev_nr_sectors and bdev_nr_bytes
        block: cache inode size in bdev
        udf: use sb_bdev_nr_blocks
        reiserfs: use sb_bdev_nr_blocks
        ntfs: use sb_bdev_nr_blocks
        jfs: use sb_bdev_nr_blocks
        ext4: use sb_bdev_nr_blocks
        block: add a sb_bdev_nr_blocks helper
        block: use bdev_nr_bytes instead of open coding it in blkdev_fallocate
        squashfs: use bdev_nr_bytes instead of open coding it
        reiserfs: use bdev_nr_bytes instead of open coding it
        pstore/blk: use bdev_nr_bytes instead of open coding it
        ntfs3: use bdev_nr_bytes instead of open coding it
        nilfs2: use bdev_nr_bytes instead of open coding it
        nfs/blocklayout: use bdev_nr_bytes instead of open coding it
        jfs: use bdev_nr_bytes instead of open coding it
        hfsplus: use bdev_nr_sectors instead of open coding it
        hfs: use bdev_nr_sectors instead of open coding it
        ...
      3f01727f
    • Linus Torvalds's avatar
      Merge tag 'for-5.16/io_uring-2021-10-29' of git://git.kernel.dk/linux-block · 8d1f0177
      Linus Torvalds authored
      Pull io_uring updates from Jens Axboe:
       "Light on new features - basically just the hybrid mode support.
      
        Outside of that it's just fixes, cleanups, and performance
        improvements.
      
        In detail:
      
         - Add ring related information to the fdinfo output (Hao)
      
         - Hybrid async mode (Hao)
      
         - Support for batched issue on block (me)
      
         - sqe error trace improvement (me)
      
         - IOPOLL efficiency improvements (Pavel)
      
         - submit state cleanups and improvements (Pavel)
      
         - Completion side improvements (Pavel)
      
         - Drain improvements (Pavel)
      
         - Buffer selection cleanups (Pavel)
      
         - Fixed file node improvements (Pavel)
      
         - io-wq setup cancelation fix (Pavel)
      
         - Various other performance improvements and cleanups (Pavel)
      
         - Misc fixes (Arnd, Bixuan, Changcheng, Hao, me, Noah)"
      
      * tag 'for-5.16/io_uring-2021-10-29' of git://git.kernel.dk/linux-block: (97 commits)
        io-wq: remove worker to owner tw dependency
        io_uring: harder fdinfo sq/cq ring iterating
        io_uring: don't assign write hint in the read path
        io_uring: clusterise ki_flags access in rw_prep
        io_uring: kill unused param from io_file_supports_nowait
        io_uring: clean up timeout async_data allocation
        io_uring: don't try io-wq polling if not supported
        io_uring: check if opcode needs poll first on arming
        io_uring: clean iowq submit work cancellation
        io_uring: clean io_wq_submit_work()'s main loop
        io-wq: use helper for worker refcounting
        io_uring: implement async hybrid mode for pollable requests
        io_uring: Use ERR_CAST() instead of ERR_PTR(PTR_ERR())
        io_uring: split logic of force_nonblock
        io_uring: warning about unused-but-set parameter
        io_uring: inform block layer of how many requests we are submitting
        io_uring: simplify io_file_supports_nowait()
        io_uring: combine REQ_F_NOWAIT_{READ,WRITE} flags
        io_uring: arm poll for non-nowait files
        fs/io_uring: Prioritise checking faster conditions first in io_write
        ...
      8d1f0177
    • Linus Torvalds's avatar
      Merge tag 'for-5.16/drivers-2021-10-29' of git://git.kernel.dk/linux-block · 643a7234
      Linus Torvalds authored
      Pull block driver updates from Jens Axboe:
      
       - paride driver cleanups (Christoph)
      
       - Remove cryptoloop support (Christoph)
      
       - null_blk poll support (me)
      
       - Now that add_disk() supports proper error handling, add it to various
         drivers (Luis)
      
       - Make ataflop actually work again (Michael)
      
       - s390 dasd fixes (Stefan, Heiko)
      
       - nbd fixes (Yu, Ye)
      
       - Remove redundant wq flush in mtip32xx (Christophe)
      
       - NVMe updates
            - fix a multipath partition scanning deadlock (Hannes Reinecke)
            - generate uevent once a multipath namespace is operational again
              (Hannes Reinecke)
            - support unique discovery controller NQNs (Hannes Reinecke)
            - fix use-after-free when a port is removed (Israel Rukshin)
            - clear shadow doorbell memory on resets (Keith Busch)
            - use struct_size (Len Baker)
            - add error handling support for add_disk (Luis Chamberlain)
            - limit the maximal queue size for RDMA controllers (Max Gurtovoy)
            - use a few more symbolic names (Max Gurtovoy)
            - fix error code in nvme_rdma_setup_ctrl (Max Gurtovoy)
            - add support for ->map_queues on FC (Saurav Kashyap)
            - support the current discovery subsystem entry (Hannes Reinecke)
            - use flex_array_size and struct_size (Len Baker)
      
       - bcache fixes (Christoph, Coly, Chao, Lin, Qing)
      
       - MD updates (Christoph, Guoqing, Xiao)
      
       - Misc fixes (Dan, Ding, Jiapeng, Shin'ichiro, Ye)
      
      * tag 'for-5.16/drivers-2021-10-29' of git://git.kernel.dk/linux-block: (117 commits)
        null_blk: Fix handling of submit_queues and poll_queues attributes
        block: ataflop: Fix warning comparing pointer to 0
        bcache: replace snprintf in show functions with sysfs_emit
        bcache: move uapi header bcache.h to bcache code directory
        nvmet: use flex_array_size and struct_size
        nvmet: register discovery subsystem as 'current'
        nvmet: switch check for subsystem type
        nvme: add new discovery log page entry definitions
        block: ataflop: more blk-mq refactoring fixes
        block: remove support for cryptoloop and the xor transfer
        mtd: add add_disk() error handling
        rnbd: add error handling support for add_disk()
        um/drivers/ubd_kern: add error handling support for add_disk()
        m68k/emu/nfblock: add error handling support for add_disk()
        xen-blkfront: add error handling support for add_disk()
        bcache: add error handling support for add_disk()
        dm: add add_disk() error handling
        block: aoe: fixup coccinelle warnings
        nvmet: use struct_size over open coded arithmetic
        nvme: drop scan_lock and always kick requeue list when removing namespaces
        ...
      643a7234
    • Linus Torvalds's avatar
      Merge tag 'for-5.16/block-2021-10-29' of git://git.kernel.dk/linux-block · 33c8846c
      Linus Torvalds authored
      Pull block updates from Jens Axboe:
      
       - mq-deadline accounting improvements (Bart)
      
       - blk-wbt timer fix (Andrea)
      
       - Untangle the block layer includes (Christoph)
      
       - Rework the poll support to be bio based, which will enable adding
         support for polling for bio based drivers (Christoph)
      
       - Block layer core support for multi-actuator drives (Damien)
      
       - blk-crypto improvements (Eric)
      
       - Batched tag allocation support (me)
      
       - Request completion batching support (me)
      
       - Plugging improvements (me)
      
       - Shared tag set improvements (John)
      
       - Concurrent queue quiesce support (Ming)
      
       - Cache bdev in ->private_data for block devices (Pavel)
      
       - bdev dio improvements (Pavel)
      
       - Block device invalidation and block size improvements (Xie)
      
       - Various cleanups, fixes, and improvements (Christoph, Jackie,
         Masahira, Tejun, Yu, Pavel, Zheng, me)
      
      * tag 'for-5.16/block-2021-10-29' of git://git.kernel.dk/linux-block: (174 commits)
        blk-mq-debugfs: Show active requests per queue for shared tags
        block: improve readability of blk_mq_end_request_batch()
        virtio-blk: Use blk_validate_block_size() to validate block size
        loop: Use blk_validate_block_size() to validate block size
        nbd: Use blk_validate_block_size() to validate block size
        block: Add a helper to validate the block size
        block: re-flow blk_mq_rq_ctx_init()
        block: prefetch request to be initialized
        block: pass in blk_mq_tags to blk_mq_rq_ctx_init()
        block: add rq_flags to struct blk_mq_alloc_data
        block: add async version of bio_set_polled
        block: kill DIO_MULTI_BIO
        block: kill unused polling bits in __blkdev_direct_IO()
        block: avoid extra iter advance with async iocb
        block: Add independent access ranges support
        blk-mq: don't issue request directly in case that current is to be blocked
        sbitmap: silence data race warning
        blk-cgroup: synchronize blkg creation against policy deactivation
        block: refactor bio_iov_bvec_set()
        block: add single bio async direct IO helper
        ...
      33c8846c
    • Linus Torvalds's avatar
      Merge tag 'locks-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux · 9ac21142
      Linus Torvalds authored
      Pull file locking updates from Jeff Layton:
       "Most of this is just follow-on cleanup work of documentation and
        comments from the mandatory locking removal in v5.15.
      
        The only real functional change is that LOCK_MAND flock() support is
        also being removed, as it has basically been non-functional since the
        v2.5 days"
      
      * tag 'locks-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux:
        fs: remove leftover comments from mandatory locking removal
        locks: remove changelog comments
        docs: fs: locks.rst: update comment about mandatory file locking
        Documentation: remove reference to now removed mandatory-locking doc
        locks: remove LOCK_MAND flock lock support
      9ac21142
    • Linus Torvalds's avatar
      Merge tag 'tpmdd-next-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd · ad98a924
      Linus Torvalds authored
      Pull tpm updates from Jarkko Sakkinen:
       "Only bug fixes"
      
      * tag 'tpmdd-next-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd:
        tpm_tis_spi: Add missing SPI ID
        tpm: fix Atmel TPM crash caused by too frequent queries
        tpm: Check for integer overflow in tpm2_map_response_body()
        tpm: tis: Kconfig: Add helper dependency on COMPILE_TEST
      ad98a924
    • Linus Torvalds's avatar
      Merge tag 'folio-5.16' of git://git.infradead.org/users/willy/pagecache · 49f8275c
      Linus Torvalds authored
      Pull memory folios from Matthew Wilcox:
       "Add memory folios, a new type to represent either order-0 pages or the
        head page of a compound page. This should be enough infrastructure to
        support filesystems converting from pages to folios.
      
        The point of all this churn is to allow filesystems and the page cache
        to manage memory in larger chunks than PAGE_SIZE. The original plan
        was to use compound pages like THP does, but I ran into problems with
        some functions expecting only a head page while others expect the
        precise page containing a particular byte.
      
        The folio type allows a function to declare that it's expecting only a
        head page. Almost incidentally, this allows us to remove various calls
        to VM_BUG_ON(PageTail(page)) and compound_head().
      
        This converts just parts of the core MM and the page cache. For 5.17,
        we intend to convert various filesystems (XFS and AFS are ready; other
        filesystems may make it) and also convert more of the MM and page
        cache to folios. For 5.18, multi-page folios should be ready.
      
        The multi-page folios offer some improvement to some workloads. The
        80% win is real, but appears to be an artificial benchmark (postgres
        startup, which isn't a serious workload). Real workloads (eg building
        the kernel, running postgres in a steady state, etc) seem to benefit
        between 0-10%. I haven't heard of any performance losses as a result
        of this series. Nobody has done any serious performance tuning; I
        imagine that tweaking the readahead algorithm could provide some more
        interesting wins. There are also other places where we could choose to
        create large folios and currently do not, such as writes that are
        larger than PAGE_SIZE.
      
        I'd like to thank all my reviewers who've offered review/ack tags:
        Christoph Hellwig, David Howells, Jan Kara, Jeff Layton, Johannes
        Weiner, Kirill A. Shutemov, Michal Hocko, Mike Rapoport, Vlastimil
        Babka, William Kucharski, Yu Zhao and Zi Yan.
      
        I'd also like to thank those who gave feedback I incorporated but
        haven't offered up review tags for this part of the series: Nick
        Piggin, Mel Gorman, Ming Lei, Darrick Wong, Ted Ts'o, John Hubbard,
        Hugh Dickins, and probably a few others who I forget"
      
      * tag 'folio-5.16' of git://git.infradead.org/users/willy/pagecache: (90 commits)
        mm/writeback: Add folio_write_one
        mm/filemap: Add FGP_STABLE
        mm/filemap: Add filemap_get_folio
        mm/filemap: Convert mapping_get_entry to return a folio
        mm/filemap: Add filemap_add_folio()
        mm/filemap: Add filemap_alloc_folio
        mm/page_alloc: Add folio allocation functions
        mm/lru: Add folio_add_lru()
        mm/lru: Convert __pagevec_lru_add_fn to take a folio
        mm: Add folio_evictable()
        mm/workingset: Convert workingset_refault() to take a folio
        mm/filemap: Add readahead_folio()
        mm/filemap: Add folio_mkwrite_check_truncate()
        mm/filemap: Add i_blocks_per_folio()
        mm/writeback: Add folio_redirty_for_writepage()
        mm/writeback: Add folio_account_redirty()
        mm/writeback: Add folio_clear_dirty_for_io()
        mm/writeback: Add folio_cancel_dirty()
        mm/writeback: Add folio_account_cleaned()
        mm/writeback: Add filemap_dirty_folio()
        ...
      49f8275c
  2. 31 Oct, 2021 7 commits
  3. 30 Oct, 2021 6 commits
  4. 29 Oct, 2021 17 commits
    • Linus Torvalds's avatar
      Merge tag 'block-5.15-2021-10-29' of git://git.kernel.dk/linux-block · a379fbbc
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
      
       - NVMe pull request:
            - fix nvmet-tcp header digest verification (Amit Engel)
            - fix a memory leak in nvmet-tcp when releasing a queue (Maurizio
              Lombardi)
            - fix nvme-tcp H2CData PDU send accounting again (Sagi Grimberg)
            - fix digest pointer calculation in nvme-tcp and nvmet-tcp (Varun
              Prakash)
            - fix possible nvme-tcp req->offset corruption (Varun Prakash)
      
       - Queue drain ordering fix (Ming)
      
       - Partition check regression for zoned devices (Shin'ichiro)
      
       - Zone queue restart fix (Naohiro)
      
      * tag 'block-5.15-2021-10-29' of git://git.kernel.dk/linux-block:
        block: Fix partition check for host-aware zoned block devices
        nvmet-tcp: fix header digest verification
        nvmet-tcp: fix data digest pointer calculation
        nvme-tcp: fix data digest pointer calculation
        nvme-tcp: fix possible req->offset corruption
        block: schedule queue restart after BLK_STS_ZONE_RESOURCE
        block: drain queue after disk is removed from sysfs
        nvme-tcp: fix H2CData PDU send accounting (again)
        nvmet-tcp: fix a memory leak when releasing a queue
      a379fbbc
    • Martin K. Petersen's avatar
      scsi: mpt3sas: Fix reference tag handling for WRITE_INSERT · 61a9f252
      Martin K. Petersen authored
      Testing revealed a problem with how the reference tag was handled for
      a WRITE_INSERT operation. The SCSI_PROT_REF_CHECK flag is not set when
      the controller is asked to generate the protection information
      (i.e. not DIX). And as a result the initial reference tag would not be
      set in the WRITE_INSERT case.
      
      Separate handling of the REF_CHECK and REF_INCREMENT flags to align
      with both the DIX spec and the MPI implementation.
      
      Link: https://lore.kernel.org/r/20211028034202.24225-1-martin.petersen@oracle.com
      Fixes: b3e2c72a ("scsi: mpt3sas: Use the proper SCSI midlayer interfaces for PI")
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      61a9f252
    • Linus Torvalds's avatar
      Merge tag 'mmc-v5.15-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · 17d50f89
      Linus Torvalds authored
      Pull MMC fixes from Ulf Hansson:
      
       - tmio: Re-enable card irqs after a reset
      
       - mtk-sd: Fixup probing of cqhci for crypto
      
       - cqhci: Fix support for suspend/resume
      
       - vub300: Fix control-message timeouts
      
       - dw_mmc-exynos: Fix support for tuning
      
       - winbond: Silences build errors on M68K
      
       - sdhci-esdhc-imx: Fix support for tuning
      
       - sdhci-pci: Read card detect from ACPI for Intel Merrifield
      
       - sdhci: Fix eMMC support for Thundercomm TurboX CM2290
      
      * tag 'mmc-v5.15-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
        mmc: tmio: reenable card irqs after the reset callback
        mmc: mediatek: Move cqhci init behind ungate clock
        mmc: cqhci: clear HALT state after CQE enable
        mmc: vub300: fix control-message timeouts
        mmc: dw_mmc: exynos: fix the finding clock sample value
        mmc: winbond: don't build on M68K
        mmc: sdhci-esdhc-imx: clear the buffer_read_ready to reset standard tuning circuit
        mmc: sdhci-pci: Read card detect from ACPI for Intel Merrifield
        mmc: sdhci: Map more voltage level to SDHCI_POWER_330
      17d50f89
    • Linus Torvalds's avatar
      Merge tag 'for-5.15-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · fd919bbd
      Linus Torvalds authored
      Pull btrfs fixes from David Sterba:
       "Last minute fixes for crash on 32bit architectures when compression is
        in use. It's a regression introduced in 5.15-rc and I'd really like
        not let this into the final release, fixes via stable trees would add
        unnecessary delay.
      
        The problem is on 32bit architectures with highmem enabled, the pages
        for compression may need to be kmapped, while the patches removed that
        as we don't use GFP_HIGHMEM allocations anymore. The pages that don't
        come from local allocation still may be from highmem. Despite being on
        32bit there's enough such ARM machines in use so it's not a marginal
        issue.
      
        I did full reverts of the patches one by one instead of a huge one.
        There's one exception for the "lzo" revert as there was an
        intermediate patch touching the same code to make it compatible with
        subpage. I can't revert that one too, so the revert in lzo.c is
        manual. Qu Wenruo has worked on that with me and verified the changes"
      
      * tag 'for-5.15-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        Revert "btrfs: compression: drop kmap/kunmap from lzo"
        Revert "btrfs: compression: drop kmap/kunmap from zlib"
        Revert "btrfs: compression: drop kmap/kunmap from zstd"
        Revert "btrfs: compression: drop kmap/kunmap from generic helpers"
      fd919bbd
    • Linus Torvalds's avatar
      Merge tag 'trace-v5.15-rc6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · 6f115212
      Linus Torvalds authored
      Pull tracing comment fixes from Steven Rostedt:
      
       - Some bots have informed me that some of the ftrace functions
         kernel-doc has formatting issues.
      
       - Also, fix my snake instinct.
      
      * tag 'trace-v5.15-rc6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        tracing: Fix misspelling of "missing"
        ftrace: Fix kernel-doc formatting issues
      6f115212
    • Linus Torvalds's avatar
      Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · 75c7a6c1
      Linus Torvalds authored
      Pull crypto fix from Herbert Xu:
       "Fix a build-time warning in x86/sm4"
      
      * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        crypto: x86/sm4 - Fix invalid section entry size
      75c7a6c1
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · 2c04d67e
      Linus Torvalds authored
      Merge misc fixes from Andrew Morton:
       "11 patches.
      
        Subsystems affected by this patch series: mm (memcg, memory-failure,
        oom-kill, secretmem, vmalloc, hugetlb, damon, and tools), and ocfs2"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        tools/testing/selftests/vm/split_huge_page_test.c: fix application of sizeof to pointer
        mm/damon/core-test: fix wrong expectations for 'damon_split_regions_of()'
        mm: khugepaged: skip huge page collapse for special files
        mm, thp: bail out early in collapse_file for writeback page
        mm/vmalloc: fix numa spreading for large hash tables
        mm/secretmem: avoid letting secretmem_users drop to zero
        ocfs2: fix race between searching chunks and release journal_head from buffer_head
        mm/oom_kill.c: prevent a race between process_mrelease and exit_mmap
        mm: filemap: check if THP has hwpoisoned subpage for PMD page fault
        mm: hwpoison: remove the unnecessary THP check
        memcg: page_alloc: skip bulk allocator for __GFP_ACCOUNT
      2c04d67e
    • Alexandre Ghiti's avatar
      riscv: Fix asan-stack clang build · 54c5639d
      Alexandre Ghiti authored
      Nathan reported that because KASAN_SHADOW_OFFSET was not defined in
      Kconfig, it prevents asan-stack from getting disabled with clang even
      when CONFIG_KASAN_STACK is disabled: fix this by defining the
      corresponding config.
      Reported-by: default avatarNathan Chancellor <nathan@kernel.org>
      Signed-off-by: default avatarAlexandre Ghiti <alexandre.ghiti@canonical.com>
      Fixes: 8ad8b727 ("riscv: Add KASAN support")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarPalmer Dabbelt <palmerdabbelt@google.com>
      54c5639d
    • Alexandre Ghiti's avatar
      riscv: Do not re-populate shadow memory with kasan_populate_early_shadow · cf11d011
      Alexandre Ghiti authored
      When calling this function, all the shadow memory is already populated
      with kasan_early_shadow_pte which has PAGE_KERNEL protection.
      kasan_populate_early_shadow write-protects the mapping of the range
      of addresses passed in argument in zero_pte_populate, which actually
      write-protects all the shadow memory mapping since kasan_early_shadow_pte
      is used for all the shadow memory at this point. And then when using
      memblock API to populate the shadow memory, the first write access to the
      kernel stack triggers a trap. This becomes visible with the next commit
      that contains a fix for asan-stack.
      
      We already manually populate all the shadow memory in kasan_early_init
      and we write-protect kasan_early_shadow_pte at the end of kasan_init
      which makes the calls to kasan_populate_early_shadow superfluous so
      we can remove them.
      Signed-off-by: default avatarAlexandre Ghiti <alexandre.ghiti@canonical.com>
      Fixes: e178d670 ("riscv/kasan: add KASAN_VMALLOC support")
      Fixes: 8ad8b727 ("riscv: Add KASAN support")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarPalmer Dabbelt <palmerdabbelt@google.com>
      cf11d011
    • Pavel Begunkov's avatar
      io-wq: remove worker to owner tw dependency · 1d5f5ea7
      Pavel Begunkov authored
      INFO: task iou-wrk-6609:6612 blocked for more than 143 seconds.
            Not tainted 5.15.0-rc5-syzkaller #0
      "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
      task:iou-wrk-6609    state:D stack:27944 pid: 6612 ppid:  6526 flags:0x00004006
      Call Trace:
       context_switch kernel/sched/core.c:4940 [inline]
       __schedule+0xb44/0x5960 kernel/sched/core.c:6287
       schedule+0xd3/0x270 kernel/sched/core.c:6366
       schedule_timeout+0x1db/0x2a0 kernel/time/timer.c:1857
       do_wait_for_common kernel/sched/completion.c:85 [inline]
       __wait_for_common kernel/sched/completion.c:106 [inline]
       wait_for_common kernel/sched/completion.c:117 [inline]
       wait_for_completion+0x176/0x280 kernel/sched/completion.c:138
       io_worker_exit fs/io-wq.c:183 [inline]
       io_wqe_worker+0x66d/0xc40 fs/io-wq.c:597
       ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
      
      io-wq worker may submit a task_work to the master task and upon
      io_worker_exit() wait for the tw to get executed. The problem appears
      when the master task is waiting in coredump.c:
      
      468                     freezer_do_not_count();
      469                     wait_for_completion(&core_state->startup);
      470                     freezer_count();
      
      Apparently having some dependency on children threads getting everything
      stuck. Workaround it by cancelling the taks_work callback that causes it
      before going into io_worker_exit() waiting.
      
      p.s. probably a better option is to not submit tw elevating the refcount
      in the first place, but let's leave this excercise for the future.
      
      Cc: stable@vger.kernel.org
      Reported-and-tested-by: syzbot+27d62ee6f256b186883e@syzkaller.appspotmail.com
      Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
      Link: https://lore.kernel.org/r/142a716f4ed936feae868959059154362bfa8c19.1635509451.git.asml.silence@gmail.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
      1d5f5ea7
    • Jens Axboe's avatar
      io_uring: harder fdinfo sq/cq ring iterating · f75d1183
      Jens Axboe authored
      The ring iteration is racy, which isn't necessarily a problem except it
      can cause us to iterate the whole thing. That isn't desired or ideal,
      and it can lead to excessive runtimes of reading fdinfo.
      
      Cap the iteration at tail - head OR the ring size. While in there, clean
      up the ring masking and just dump the raw values along with the masks.
      That provides more useful debug info.
      
      Fixes: 83f84356 ("io_uring: add more uring info to fdinfo for debug")
      Reported-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      f75d1183
    • Steven Rostedt (VMware)'s avatar
      tracing: Fix misspelling of "missing" · ddcf906f
      Steven Rostedt (VMware) authored
      My snake instinct was on and I wrote "misssing" instead of "missing".
      Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      ddcf906f
    • Steven Rostedt (VMware)'s avatar
      ftrace: Fix kernel-doc formatting issues · 6130722f
      Steven Rostedt (VMware) authored
      Some functions had kernel-doc that used a comma instead of a hash to
      separate the function name from the one line description.
      
      Also, the "ftrace_is_dead()" had an incomplete description.
      Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      6130722f
    • Shin'ichiro Kawasaki's avatar
      null_blk: Fix handling of submit_queues and poll_queues attributes · 15dfc662
      Shin'ichiro Kawasaki authored
      Commit 0a593fbb ("null_blk: poll queue support") introduced the poll
      queue feature to null_blk. After this change, null_blk device has both
      submit queues and poll queues, and null_map_queues() callback maps the
      both queues for corresponding hardware contexts. The commit also added
      the device configuration attribute 'poll_queues' in same manner as the
      existing attribute 'submit_queues'. These attributes allow to modify the
      numbers of queues. However, when the new values are stored to these
      attributes, the values are just handled only for the corresponding
      queue. When number of submit_queue is updated, number of poll_queue is
      not counted, or vice versa.  This caused inconsistent number of queues
      and queue mapping and resulted in null-ptr-dereference. This failure was
      observed in blktests block/029 and block/030.
      
      To avoid the inconsistency, fix the attribute updates to care both
      submit_queues and poll_queues. Introduce the helper function
      nullb_update_nr_hw_queues() to handle stores to the both two attributes.
      Add poll_queues field to the struct nullb_device to track the number in
      same manner as submit_queues. Add two more fields prev_submit_queues and
      prev_poll_queues to keep the previous values before change. In case the
      block layer failed to update the nr_hw_queues, refer the previous values
      in null_map_queues() to map queues in same manner as before change.
      
      Also add poll_queues value checks in nullb_update_nr_hw_queues() and
      null_validate_conf(). They ensure the poll_queues value of each device
      is within the range from 1 to module parameter value of poll_queues.
      
      Fixes: 0a593fbb ("null_blk: poll queue support")
      Reported-by: default avatarYi Zhang <yi.zhang@redhat.com>
      Signed-off-by: default avatarShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
      Link: https://lore.kernel.org/r/20211029103926.845635-1-shinichiro.kawasaki@wdc.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
      15dfc662
    • Jiapeng Chong's avatar
      block: ataflop: Fix warning comparing pointer to 0 · df75db1f
      Jiapeng Chong authored
      Fix the following coccicheck warning:
      
      ./drivers/block/ataflop.c:1464:20-21: WARNING comparing pointer to 0.
      Reported-by: default avatarAbaci Robot <abaci@linux.alibaba.com>
      Signed-off-by: default avatarJiapeng Chong <jiapeng.chong@linux.alibaba.com>
      Link: https://lore.kernel.org/r/1635501029-81391-1-git-send-email-jiapeng.chong@linux.alibaba.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
      df75db1f
    • John Garry's avatar
      blk-mq-debugfs: Show active requests per queue for shared tags · 9b84c629
      John Garry authored
      Currently we show the hctx.active value for the per-hctx "active" file.
      
      However this is not maintained for shared tags, and we instead keep a
      record of the number active requests per request queue - see commit
      f1b49fdc ("blk-mq: Record active_queues_shared_sbitmap per tag_set for
      when using shared sbitmap).
      
      Change for the case of shared tags to show the active requests per request
      queue by using __blk_mq_active_requests() helper.
      Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
      Link: https://lore.kernel.org/r/1635496823-33515-1-git-send-email-john.garry@huawei.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
      9b84c629
    • Christoph Hellwig's avatar
      block: remove blk_{get,put}_request · 0bf6d96c
      Christoph Hellwig authored
      These are now pointless wrappers around blk_mq_{alloc,free}_request,
      so remove them.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarChaitanya Kulkarni <kch@nvidia.com>
      Link: https://lore.kernel.org/r/20211025070517.1548584-3-hch@lst.deSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
      0bf6d96c