1. 07 Sep, 2021 12 commits
    • Linus Torvalds's avatar
      Merge tag 'ntb-5.15' of git://github.com/jonmason/ntb · 1735715e
      Linus Torvalds authored
      Pull NTB updates from Jon Mason:
       "Bug fixes and clean-ups for Linux v5.15"
      
      * tag 'ntb-5.15' of git://github.com/jonmason/ntb:
        NTB: switch from 'pci_' to 'dma_' API
        ntb: ntb_pingpong: remove redundant initialization of variables msg_data and spad_data
        NTB: perf: Fix an error code in perf_setup_inbuf()
        NTB: Fix an error code in ntb_msit_probe()
        ntb: intel: remove invalid email address in header comment
      1735715e
    • Linus Torvalds's avatar
      Merge tag 'rproc-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc · 21f577b0
      Linus Torvalds authored
      Pull remoteproc updates from Bjorn Andersson:
      
       - move the crash recovery worker to the freezable work queue to avoid
         interaction with other drivers during suspend & resume
      
       - fix a couple of typos in comments
      
       - add support for handling the audio DSP on SDM660
      
       - fix a race between the Qualcomm wireless subsystem driver and the
         associated driver for the RF chip
      
      * tag 'rproc-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc:
        remoteproc: q6v5_pas: Add sdm660 ADSP PIL compatible
        dt-bindings: remoteproc: qcom: adsp: Add SDM660 ADSP
        remoteproc: use freezable workqueue for crash notifications
        remoteproc: fix kernel doc for struct rproc_ops
        remoteproc: fix an typo in fw_elf_get_class code comments
        remoteproc: qcom: wcnss: Fix race with iris probe
      21f577b0
    • Linus Torvalds's avatar
      Merge tag 'backlight-next-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight · 2d7b4cdb
      Linus Torvalds authored
      Pull backlight updates from Lee Jones:
       "Fix-ups:
         - Improve bootloader/kernel device handover
      
        Bug Fixes:
         - Stabilise backlight in ktd253 driver"
      
      * tag 'backlight-next-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight:
        backlight: pwm_bl: Improve bootloader/kernel device handover
        backlight: ktd253: Stabilize backlight
      2d7b4cdb
    • Linus Torvalds's avatar
      Merge tag 'mfd-next-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd · 86406a9e
      Linus Torvalds authored
      Pull MFD updates from Lee Jones:
       "Core Frameworks:
         - Add support for registering devices via MFD cells to Simple MFD (I2C)
      
        New Drivers:
         - Add support for Renesas Synchronization Management Unit (SMU)
      
        New Device Support:
         - Add support for N5010 to Intel M10 BMC
         - Add support for Cannon Lake to Intel LPSS ACPI
         - Add support for Samsung SSG{1,2} to ST-Ericsson's U8500 family
         - Add support for TQMx110EB and TQMxE40x to TQ-Systems PLD TQMx86
      
        New Functionality:
         - Add support for GPIO to Intel LPC ICH
         - Add support for Reset to Texas Instruments TPS65086
      
        Fix-ups:
         - Trivial, sorting, whitespace, renaming, etc; mt6360-core, db8500-prcmu-regs, tqmx86
         - Device Tree fiddling; syscon, axp20x, qcom,pm8008, ti,tps65086, brcm,cru
         - Use proper APIs for IRQ map resolution; ab8500-core, stmpe, tc3589x, wm8994-irq
         - Pass 'supplied-from' property through axp288_fuel_gauge via swnode
         - Remove unused file entry; MAINTAINERS
         - Make interrupt line optional; tps65086
         - Rename db8500-cpuidle driver symbol; db8500-prcmu
         - Remove support for unused hardware; tqmx86
         - Provide a standard LPC clock frequency for unknown boards; tqmx86
         - Remove unused code; ti_am335x_tscadc
         - Use of_iomap() instead of ioremap(); syscon
      
        Bug Fixes:
         - Clear GPIO IRQ resource flags when no IRQ is set; tqmx86
         - Fix incorrect/misleading frequencies; db8500-prcmu
         - Mitigate namespace clash with other GPIOBASE users"
      
      * tag 'mfd-next-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (31 commits)
        mfd: lpc_sch: Rename GPIOBASE to prevent build error
        mfd: syscon: Use of_iomap() instead of ioremap()
        dt-bindings: mfd: Add Broadcom CRU
        mfd: ti_am335x_tscadc: Delete superfluous error message
        mfd: tqmx86: Assume 24MHz LPC clock for unknown boards
        mfd: tqmx86: Add support for TQ-Systems DMI IDs
        mfd: tqmx86: Add support for TQMx110EB and TQMxE40x
        mfd: tqmx86: Fix typo in "platform"
        mfd: tqmx86: Remove incorrect TQMx90UC board ID
        mfd: tqmx86: Clear GPIO IRQ resource when no IRQ is set
        mfd: simple-mfd-i2c: Add support for registering devices via MFD cells
        mfd/cpuidle: ux500: Rename driver symbol
        mfd: tps65086: Add cell entry for reset driver
        mfd: tps65086: Make interrupt line optional
        dt-bindings: mfd: Convert tps65086.txt to YAML
        MAINTAINERS: Adjust ARM/NOMADIK/Ux500 ARCHITECTURES to file renaming
        mfd: db8500-prcmu: Handle missing FW variant
        mfd: db8500-prcmu: Rename register header
        mfd: axp20x: Add supplied-from property to axp288_fuel_gauge cell
        mfd: Don't use irq_create_mapping() to resolve a mapping
        ...
      86406a9e
    • Linus Torvalds's avatar
      Merge tag 'gpio-updates-for-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux · 5e6a5845
      Linus Torvalds authored
      Pull gpio updates from Bartosz Golaszewski:
       "We mostly have various improvements and refactoring all over the place
        but also some interesting new features - like the virtio GPIO driver
        that allows guest VMs to use host's GPIOs. We also have a new/old GPIO
        driver for rockchip - this one has been split out of the pinctrl
        driver.
      
        Summary:
      
         - new driver: gpio-virtio allowing a guest VM running linux to access
           GPIO lines provided by the host
      
         - split the GPIO driver out of the rockchip pin control driver
      
         - add support for a new model to gpio-aspeed-sgpio, refactor the
           driver and use generic device property interfaces, improve property
           sanitization
      
         - add ACPI support to gpio-tegra186
      
         - improve the code setting the line names to support multiple GPIO
           banks per device
      
         - constify a bunch of OF functions in the core GPIO code and make the
           declaration for one of the core OF functions we use consistent
           within its header
      
         - use software nodes in intel_quark_i2c_gpio
      
         - add support for the gpio-line-names property in gpio-mt7621
      
         - use the standard GPIO function for setting the GPIO names in
           gpio-brcmstb
      
         - fix a bunch of leaks and other bugs in gpio-mpc8xxx
      
         - use generic pm callbacks in gpio-ml-ioh
      
         - improve resource management and PM handling in gpio-mlxbf2
      
         - modernize and improve the gpio-dwapb driver
      
         - coding style improvements in gpio-rcar
      
         - documentation fixes and improvements
      
         - update the MAINTAINERS entry for gpio-zynq
      
         - minor tweaks in several drivers"
      
      * tag 'gpio-updates-for-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (35 commits)
        gpio: mpc8xxx: Use 'devm_gpiochip_add_data()' to simplify the code and avoid a leak
        gpio: mpc8xxx: Fix a potential double iounmap call in 'mpc8xxx_probe()'
        gpio: mpc8xxx: Fix a resources leak in the error handling path of 'mpc8xxx_probe()'
        gpio: viperboard: remove platform_set_drvdata() call in probe
        gpio: virtio: Add missing mailings lists in MAINTAINERS entry
        gpio: virtio: Fix sparse warnings
        gpio: remove the obsolete MX35 3DS BOARD MC9S08DZ60 GPIO functions
        gpio: max730x: Use the right include
        gpio: Add virtio-gpio driver
        gpio: mlxbf2: Use DEFINE_RES_MEM_NAMED() helper macro
        gpio: mlxbf2: Use devm_platform_ioremap_resource()
        gpio: mlxbf2: Drop wrong use of ACPI_PTR()
        gpio: mlxbf2: Convert to device PM ops
        gpio: dwapb: Get rid of legacy platform data
        mfd: intel_quark_i2c_gpio: Convert GPIO to use software nodes
        gpio: dwapb: Read GPIO base from gpio-base property
        gpio: dwapb: Unify ACPI enumeration checks in get_irq() and configure_irqs()
        gpiolib: Deduplicate forward declaration in the consumer.h header
        MAINTAINERS: update gpio-zynq.yaml reference
        gpio: tegra186: Add ACPI support
        ...
      5e6a5845
    • Linus Torvalds's avatar
      Merge tag 'fuse-update-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse · 75b96f0e
      Linus Torvalds authored
      Pull fuse updates from Miklos Szeredi:
      
       - Allow mounting an active fuse device. Previously the fuse device
         would always be mounted during initialization, and sharing a fuse
         superblock was only possible through mount or namespace cloning
      
       - Fix data flushing in syncfs (virtiofs only)
      
       - Fix data flushing in copy_file_range()
      
       - Fix a possible deadlock in atomic O_TRUNC
      
       - Misc fixes and cleanups
      
      * tag 'fuse-update-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
        fuse: remove unused arg in fuse_write_file_get()
        fuse: wait for writepages in syncfs
        fuse: flush extending writes
        fuse: truncate pagecache on atomic_o_trunc
        fuse: allow sharing existing sb
        fuse: move fget() to fuse_get_tree()
        fuse: move option checking into fuse_fill_super()
        fuse: name fs_context consistently
        fuse: fix use after free in fuse_read_interrupt()
      75b96f0e
    • Linus Torvalds's avatar
      Merge tag 'kgdb-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux · 996fe061
      Linus Torvalds authored
      Pull kgdb updates from Daniel Thompson:
       "Changes for kgdb/kdb this cycle are dominated by a change from Sumit
        that removes as small (256K) private heap from kdb. This is change
        I've hoped for ever since I discovered how few users of this heap
        remained in the kernel, so many thanks to Sumit for hunting these
        down.
      
        The other change is an incremental step towards SPDX headers"
      
      * tag 'kgdb-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux:
        kernel: debug: Convert to SPDX identifier
        kdb: Rename members of struct kdbtab_t
        kdb: Simplify kdb_defcmd macro logic
        kdb: Get rid of redundant kdb_register_flags()
        kdb: Rename struct defcmd_set to struct kdb_macro
        kdb: Get rid of custom debug heap allocator
      996fe061
    • Linus Torvalds's avatar
      Revert "memcg: enable accounting for pollfd and select bits arrays" · 0bcfe68b
      Linus Torvalds authored
      This reverts commit b6558434.
      
      Just like with the memcg lock accounting, the kernel test robot reports
      a sizeable performance regression for this commit, and while it clearly
      does the rigth thing in theory, we'll need to look at just how to avoid
      or minimize the performance overhead of the memcg accounting.
      
      People already have suggestions on how to do that, but it's "future
      work".
      
      So revert it for now.
      
      [ Note: the first link below is for this same commit but a different
        commit ID, because it's the kernel test robot ended up noticing it in
        Andrew Morton's patch queue ]
      
      Link: https://lore.kernel.org/lkml/20210905132732.GC15026@xsang-OptiPlex-9020/
      Link: https://lore.kernel.org/lkml/20210907150757.GE17617@xsang-OptiPlex-9020/Acked-by: default avatarJens Axboe <axboe@kernel.dk>
      Acked-by: default avatarShakeel Butt <shakeelb@google.com>
      Acked-by: default avatarRoman Gushchin <guro@fb.com>
      Cc: Tejun Heo <tj@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0bcfe68b
    • Linus Torvalds's avatar
      Revert "memcg: enable accounting for file lock caches" · 3754707b
      Linus Torvalds authored
      This reverts commit 0f12156d.
      
      The kernel test robot reports a sizeable performance regression for this
      commit, and while it clearly does the rigth thing in theory, we'll need
      to look at just how to avoid or minimize the performance overhead of the
      memcg accounting.
      
      People already have suggestions on how to do that, but it's "future
      work".
      
      So revert it for now.
      
      Link: https://lore.kernel.org/lkml/20210907150757.GE17617@xsang-OptiPlex-9020/Acked-by: default avatarJens Axboe <axboe@kernel.dk>
      Acked-by: default avatarShakeel Butt <shakeelb@google.com>
      Acked-by: default avatarRoman Gushchin <guro@fb.com>
      Cc: Tejun Heo <tj@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3754707b
    • Linus Torvalds's avatar
      Revert "mm/gup: remove try_get_page(), call try_get_compound_head() directly" · cd1adf1b
      Linus Torvalds authored
      This reverts commit 9857a17f.
      
      That commit was completely broken, and I should have caught on to it
      earlier.  But happily, the kernel test robot noticed the breakage fairly
      quickly.
      
      The breakage is because "try_get_page()" is about avoiding the page
      reference count overflow case, but is otherwise the exact same as a
      plain "get_page()".
      
      In contrast, "try_get_compound_head()" is an entirely different beast,
      and uses __page_cache_add_speculative() because it's not just about the
      page reference count, but also about possibly racing with the underlying
      page going away.
      
      So all the commentary about how
      
       "try_get_page() has fallen a little behind in terms of maintenance,
        try_get_compound_head() handles speculative page references more
        thoroughly"
      
      was just completely wrong: yes, try_get_compound_head() handles
      speculative page references, but the point is that try_get_page() does
      not, and must not.
      
      So there's no lack of maintainance - there are fundamentally different
      semantics.
      
      A speculative page reference would be entirely wrong in "get_page()",
      and it's entirely wrong in "try_get_page()".  It's not about
      speculation, it's purely about "uhhuh, you can't get this page because
      you've tried to increment the reference count too much already".
      
      The reason the kernel test robot noticed this bug was that it hit the
      VM_BUG_ON() in __page_cache_add_speculative(), which is all about
      verifying that the context of any speculative page access is correct.
      But since that isn't what try_get_page() is all about, the VM_BUG_ON()
      tests things that are not correct to test for try_get_page().
      Reported-by: default avatarkernel test robot <oliver.sang@intel.com>
      Cc: John Hubbard <jhubbard@nvidia.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      cd1adf1b
    • Randy Dunlap's avatar
      mfd: lpc_sch: Rename GPIOBASE to prevent build error · cdff1eda
      Randy Dunlap authored
      One MIPS platform (mach-rc32434) defines GPIOBASE. This macro
      conflicts with one of the same name in lpc_sch.c. Rename the latter one
      to prevent the build error.
      
      ../drivers/mfd/lpc_sch.c:25: error: "GPIOBASE" redefined [-Werror]
         25 | #define GPIOBASE        0x44
      ../arch/mips/include/asm/mach-rc32434/rb.h:32: note: this is the location of the previous definition
         32 | #define GPIOBASE        0x050000
      
      Cc: Denis Turischev <denis@compulab.co.il>
      Fixes: e82c60ae ("mfd: Introduce lpc_sch for Intel SCH LPC bridge")
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      cdff1eda
    • Hector Martin's avatar
      mfd: syscon: Use of_iomap() instead of ioremap() · 452d0741
      Hector Martin authored
      This automatically selects between ioremap() and ioremap_np() on
      platforms that require it, such as Apple SoCs.
      Signed-off-by: default avatarHector Martin <marcan@marcan.st>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      452d0741
  2. 06 Sep, 2021 12 commits
    • Linus Torvalds's avatar
      thunderbolt: test: split up test cases in tb_test_credit_alloc_all · 4b93c544
      Linus Torvalds authored
      The tb_test_credit_alloc_all() function had a huge number of
      KUNIT_ASSERT() statements, all of which (though the magic of many many
      layers of inscrutable macros) ended up allocating and initializing
      various test assertion structures on the stack.
      
      Don't do that.  The kernel stack isn't infinite, and we have compiler
      warnings (now errors) for the case where a stack frame grows too large.
      
      Like it did here, by not an inconsiderable margin:
      
         drivers/thunderbolt/test.c: In function ‘tb_test_credit_alloc_all’:
         drivers/thunderbolt/test.c:2367:1: error: the frame size of 4500 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]
          2367 | }
               | ^
      
      Solve this similarly to the lib/test_scanf case: split out the tests
      into several smaller functions, each just testing one particular tunnel
      credit allocation.
      
      This makes the i386 allyesconfig build work for me again.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4b93c544
    • Linus Torvalds's avatar
      lib/test_scanf: split up number parsing test routines · ba7b1f86
      Linus Torvalds authored
      It turns out that gcc has real trouble merging all the temporary
      on-stack buffer allocation.  So despite the fact that their lifetimes do
      not overlap, gcc will allocate stack for all of them when they have
      different types.  Which they do in the number scanning test routines.
      
      This is unfortunate in general, but with lots of test-cases in one
      function, it becomes a real problem.  gcc will allocate a huge stack
      frame for no actual good reason.
      
      We have tried to counteract this tendency of gcc not merging stack slots
      (see "-fconserve-stack"), but that has limited effect (and should be on
      by default these days, iirc).
      
      So with all the debug options enabled on an i386 allmodconfig build, we
      end up with overly big stack frames, and the resulting stack frame size
      warnings (now errors):
      
         lib/test_scanf.c: In function ‘numbers_list_field_width_val_width’:
         lib/test_scanf.c:530:1: error: the frame size of 2088 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]
           530 | }
               | ^
         lib/test_scanf.c: In function ‘numbers_list_field_width_typemax’:
         lib/test_scanf.c:488:1: error: the frame size of 2568 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]
           488 | }
               | ^
         lib/test_scanf.c: In function ‘numbers_list’:
         lib/test_scanf.c:437:1: error: the frame size of 2088 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]
           437 | }
               | ^
      
      In this particular case, the reasonably straightforward solution is to
      just split out the test routines into multiple more targeted versions.
      That way we don't have one huge stack, but several smaller ones, and
      they aren't active all at the same time.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ba7b1f86
    • Linus Torvalds's avatar
      iwl: fix debug printf format strings · 1476ff21
      Linus Torvalds authored
      The variable 'package_size' is an unsigned long, and should be printed
      out using '%lu', not '%zd' (that would be for a size_t).
      
      Yes, on many architectures (including x86-64), 'size_t' is in fact the
      same type as 'long', but that's a fairly random architecture definition,
      and on some platforms 'size_t' is in fact 'int' rather than 'long'.
      
      That is the case on traditional 32-bit x86.  Yes, both types are the
      exact same 32-bit size, and it would all print out perfectly correctly,
      but '%zd' ends up still being wrong.
      
      And we can't make 'package_size' be a 'size_t', because we get the
      actual value using efivar_entry_get() that takes a pointer to an
      'unsigned long'.  So '%lu' it is.
      
      This fixes two of the i386 allmodconfig build warnings (that is now an
      error due to -Werror).
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1476ff21
    • Linus Torvalds's avatar
      Merge tag 'block-5.15-2021-09-05' of git://git.kernel.dk/linux-block · 1dbe7e38
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "Was going to send this one in later this week, but given that -Werror
        is now enabled (or at least available), the mq-deadline fix really
        should go in for the folks hitting that.
      
         - Ensure dd_queued() is only there if needed (Geert)
      
         - Fix a kerneldoc warning for bio_alloc_kiocb()
      
         - BFQ fix for queue merging
      
         - loop locking fix (Tetsuo)"
      
      * tag 'block-5.15-2021-09-05' of git://git.kernel.dk/linux-block:
        loop: reduce the loop_ctl_mutex scope
        bio: fix kerneldoc documentation for bio_alloc_kiocb()
        block, bfq: honor already-setup queue merges
        block/mq-deadline: Move dd_queued() to fix defined but not used warning
      1dbe7e38
    • Linus Torvalds's avatar
      Merge tag 'misc-5.15-2021-09-05' of git://git.kernel.dk/linux-block · 03085b3d
      Linus Torvalds authored
      Pull CDROM maintainer update from Jens Axboe:
       "It's been about 22 years since I originally started maintaining the
        CDROM code, and I just haven't been able to even get reviews done in a
        timely fashion the last handful of years.
      
        Time to pass it on, and Phillip has volunteered take over these
        duties. I'll be helping as needed for the foreseeable future"
      
      * tag 'misc-5.15-2021-09-05' of git://git.kernel.dk/linux-block:
        cdrom: update uniform CD-ROM maintainership in MAINTAINERS file
      03085b3d
    • Linus Torvalds's avatar
      Merge tag 'libata-5.15-2021-09-05' of git://git.kernel.dk/linux-block · eebb4159
      Linus Torvalds authored
      Pull libata fixes from Jens Axboe:
       "Fixes for queued trim on certain Samsung SSDs, in conjunction with
        certain ATI controllers"
      
      * tag 'libata-5.15-2021-09-05' of git://git.kernel.dk/linux-block:
        libata: Add ATA_HORKAGE_NO_NCQ_ON_ATI for Samsung 860 and 870 SSD.
        libata: add ATA_HORKAGE_NO_NCQ_TRIM for Samsung 860 and 870 SSDs
      eebb4159
    • Linus Torvalds's avatar
      Merge tag 'for-5.15/io_uring-2021-09-04' of git://git.kernel.dk/linux-block · 60f8fbaa
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "As sometimes happens, two reports came in around the merge window open
        that led to some fixes. Hence this one is a bit bigger than usual
        followup fixes, but most of it will be going towards stable, outside
        of the fixes that are addressing regressions from this merge window.
      
        In detail:
      
         - postgres is a heavy user of signals between tasks, and if we're
           unlucky this can interfere with io-wq worker creation. Make sure
           we're resilient against unrelated signal handling. This set of
           changes also includes hardening against allocation failures, which
           could previously had led to stalls.
      
         - Some use cases that end up having a mix of bounded and unbounded
           work would have starvation issues related to that. Split the
           pending work lists to handle that better.
      
         - Completion trace int -> unsigned -> long fix
      
         - Fix issue with REGISTER_IOWQ_MAX_WORKERS and SQPOLL
      
         - Fix regression with hash wait lock in this merge window
      
         - Fix retry issued on block devices (Ming)
      
         - Fix regression with links in this merge window (Pavel)
      
         - Fix race with multi-shot poll and completions (Xiaoguang)
      
         - Ensure regular file IO doesn't inadvertently skip completion
           batching (Pavel)
      
         - Ensure submissions are flushed after running task_work (Pavel)"
      
      * tag 'for-5.15/io_uring-2021-09-04' of git://git.kernel.dk/linux-block:
        io_uring: io_uring_complete() trace should take an integer
        io_uring: fix possible poll event lost in multi shot mode
        io_uring: prolong tctx_task_work() with flushing
        io_uring: don't disable kiocb_done() CQE batching
        io_uring: ensure IORING_REGISTER_IOWQ_MAX_WORKERS works with SQPOLL
        io-wq: make worker creation resilient against signals
        io-wq: get rid of FIXED worker flag
        io-wq: only exit on fatal signals
        io-wq: split bounded and unbounded work into separate lists
        io-wq: fix queue stalling race
        io_uring: don't submit half-prepared drain request
        io_uring: fix queueing half-created requests
        io-wq: ensure that hash wait lock is IRQ disabling
        io_uring: retry in case of short read on block device
        io_uring: IORING_OP_WRITE needs hash_reg_file set
        io-wq: fix race between adding work and activating a free worker
      60f8fbaa
    • Stephen Rothwell's avatar
    • Cai Huoqing's avatar
      kernel: debug: Convert to SPDX identifier · f8416aa2
      Cai Huoqing authored
      use SPDX-License-Identifier instead of a verbose license text
      Signed-off-by: default avatarCai Huoqing <caihuoqing@baidu.com>
      Link: https://lore.kernel.org/r/20210906112302.937-1-caihuoqing@baidu.comSigned-off-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
      f8416aa2
    • Miklos Szeredi's avatar
      fuse: remove unused arg in fuse_write_file_get() · a9667ac8
      Miklos Szeredi authored
      The struct fuse_conn argument is not used and can be removed.
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      a9667ac8
    • Miklos Szeredi's avatar
      fuse: wait for writepages in syncfs · 660585b5
      Miklos Szeredi authored
      In case of fuse the MM subsystem doesn't guarantee that page writeback
      completes by the time ->sync_fs() is called.  This is because fuse
      completes page writeback immediately to prevent DoS of memory reclaim by
      the userspace file server.
      
      This means that fuse itself must ensure that writes are synced before
      sending the SYNCFS request to the server.
      
      Introduce sync buckets, that hold a counter for the number of outstanding
      write requests.  On syncfs replace the current bucket with a new one and
      wait until the old bucket's counter goes down to zero.
      
      It is possible to have multiple syncfs calls in parallel, in which case
      there could be more than one waited-on buckets.  Descendant buckets must
      not complete until the parent completes.  Add a count to the child (new)
      bucket until the (parent) old bucket completes.
      
      Use RCU protection to dereference the current bucket and to wake up an
      emptied bucket.  Use fc->lock to protect against parallel assignments to
      the current bucket.
      
      This leaves just the counter to be a possible scalability issue.  The
      fc->num_waiting counter has a similar issue, so both should be addressed at
      the same time.
      Reported-by: default avatarAmir Goldstein <amir73il@gmail.com>
      Fixes: 2d82ab25 ("virtiofs: propagate sync() to file server")
      Cc: <stable@vger.kernel.org> # v5.14
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      660585b5
    • Rafał Miłecki's avatar
      dt-bindings: mfd: Add Broadcom CRU · c2f24933
      Rafał Miłecki authored
      CRU is a block used in e.g. Northstar devices. It can be seen in the
      bcm5301x.dtsi and this binding documents its proper usage.
      Signed-off-by: default avatarRafał Miłecki <rafal@milecki.pl>
      Reviewed-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      c2f24933
  3. 05 Sep, 2021 10 commits
    • Christophe JAILLET's avatar
      NTB: switch from 'pci_' to 'dma_' API · 38de3aff
      Christophe JAILLET authored
      The wrappers in include/linux/pci-dma-compat.h should go away.
      
      The patch has been generated with the coccinelle script below.
      
      It has been compile tested.
      
      @@
      @@
      -    PCI_DMA_BIDIRECTIONAL
      +    DMA_BIDIRECTIONAL
      
      @@
      @@
      -    PCI_DMA_TODEVICE
      +    DMA_TO_DEVICE
      
      @@
      @@
      -    PCI_DMA_FROMDEVICE
      +    DMA_FROM_DEVICE
      
      @@
      @@
      -    PCI_DMA_NONE
      +    DMA_NONE
      
      @@
      expression e1, e2, e3;
      @@
      -    pci_alloc_consistent(e1, e2, e3)
      +    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)
      
      @@
      expression e1, e2, e3;
      @@
      -    pci_zalloc_consistent(e1, e2, e3)
      +    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_free_consistent(e1, e2, e3, e4)
      +    dma_free_coherent(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_map_single(e1, e2, e3, e4)
      +    dma_map_single(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_unmap_single(e1, e2, e3, e4)
      +    dma_unmap_single(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4, e5;
      @@
      -    pci_map_page(e1, e2, e3, e4, e5)
      +    dma_map_page(&e1->dev, e2, e3, e4, e5)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_unmap_page(e1, e2, e3, e4)
      +    dma_unmap_page(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_map_sg(e1, e2, e3, e4)
      +    dma_map_sg(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_unmap_sg(e1, e2, e3, e4)
      +    dma_unmap_sg(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_single_for_cpu(e1, e2, e3, e4)
      +    dma_sync_single_for_cpu(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_single_for_device(e1, e2, e3, e4)
      +    dma_sync_single_for_device(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_sg_for_cpu(e1, e2, e3, e4)
      +    dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_sg_for_device(e1, e2, e3, e4)
      +    dma_sync_sg_for_device(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2;
      @@
      -    pci_dma_mapping_error(e1, e2)
      +    dma_mapping_error(&e1->dev, e2)
      
      @@
      expression e1, e2;
      @@
      -    pci_set_dma_mask(e1, e2)
      +    dma_set_mask(&e1->dev, e2)
      
      @@
      expression e1, e2;
      @@
      -    pci_set_consistent_dma_mask(e1, e2)
      +    dma_set_coherent_mask(&e1->dev, e2)
      Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Acked-by: default avatarSerge Semin <fancer.lancer@gmail.com>
      Signed-off-by: default avatarJon Mason <jdmason@kudzu.us>
      38de3aff
    • Colin Ian King's avatar
      ntb: ntb_pingpong: remove redundant initialization of variables msg_data and spad_data · e6315480
      Colin Ian King authored
      The variables msg_data and spad_data are being initialized with values
      that are never read, they are being updated later on. The initializations
      are redundant and can be removed.
      
      Addresses-Coverity: ("Unused value")
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Acked-by: default avatarSerge Semin <fancer.lancer@gmail.com>
      Signed-off-by: default avatarJon Mason <jdmason@kudzu.us>
      e6315480
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-for-v5.15-2021-09-04' of... · 27151f17
      Linus Torvalds authored
      Merge tag 'perf-tools-for-v5.15-2021-09-04' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull perf tool updates from Arnaldo Carvalho de Melo:
       "New features:
      
         - Improvements for the flamegraph python script, including:
             - Display perf.data header
             - Display PIDs of user stacks
             - Added option to change color scheme
             - Default to blue/green color scheme to improve accessibility
             - Correctly identify kernel stacks when debuginfo is available
      
         - Improvements for 'perf bench futex':
             - Add --mlockall parameter
             - Add --broadcast and --pi to the 'requeue' sub benchmark
      
         - Add support for PMU aliases.
      
         - Introduce an ARM Coresight ETE decoder.
      
         - Add a 'perf bench' entry for evlist open/close operations, to help
           quantify improvements with multithreading 'perf record'.
      
         - Allow reporting the [un]throttle PERF_RECORD_ meta event in 'perf
           script's python scripting.
      
         - Add a 'perf test' entry for PMU aliases.
      
         - Add a 'perf test' entry for 'perf record/perf report/perf script'
           pipe mode.
      
        Fixes:
      
         - perf script dlfilter (API for filtering via dynamically loaded
           shared object introduced in v5.14) fixes and a 'perf test' entry
           for it.
      
         - Fix get_current_dir_name() compilation on Android.
      
         - Fix issues with asciidoc and double dashes uses.
      
         - Fix memory leaks in the BTF handling code.
      
         - Fix leftover problems in the Documentation from the infrastructure
           originally lifted from the git codebase.
      
         - Fix *probe_vfs_getname.sh 'perf test' failures.
      
         - Handle fd gaps in 'perf test's test__dso_data_reopen().
      
         - Make sure to show disasembly warnings for 'perf annotate --stdio'.
      
         - Fix output from pipe to file and vice-versa in 'perf
           record/report/script'.
      
         - Correct 'perf data -h' output.
      
         - Fix wrong comm in system-wide mode with 'perf record --delay'.
      
         - Do not allow --for-each-cgroup without cpu in 'perf stat'
      
         - Make 'perf test --skip' work on shell tests.
      
         - Fix libperf's verbose printing.
      
        Misc improvements:
      
         - Preparatory patches for multithreading various 'perf record' phases
           (synthesizing, opening, recording, etc).
      
         - Add sparse context/locking annotations in compiler-types.h, also to
           help with the multithreading effort.
      
         - Optimize the generation of the arch specific erno tables used in
           'perf trace'.
      
         - Optimize libperf's perf_cpu_map__max().
      
         - Improve ARM's CoreSight warnings.
      
         - Report collisions in AUX records.
      
         - Improve warnings for the LLVM 'perf test' entry.
      
         - Improve the PMU events 'perf test' codebase.
      
         - perf test: Do not compare overheads in the zstd comp test
      
         - Better support annotation on ARM.
      
         - Update 'perf trace's cmd string table to decode sys_bpf() first
           arg.
      
        Vendor events:
      
         - Add JSON events and metrics for Intel's Ice Lake, Tiger Lake and
           Elhart Lake.
      
         - Update JSON eventsand metrics for Intel's Cascade Lake and Sky Lake
           servers.
      
        Hardware tracing:
      
         - Improvements for the ARM hardware tracing auxtrace support"
      
      * tag 'perf-tools-for-v5.15-2021-09-04' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (130 commits)
        perf tests: Add test for PMU aliases
        perf pmu: Add PMU alias support
        perf session: Report collisions in AUX records
        perf script python: Allow reporting the [un]throttle PERF_RECORD_ meta event
        perf build: Report failure for testing feature libopencsd
        perf cs-etm: Show a warning for an unknown magic number
        perf cs-etm: Print the decoder name
        perf cs-etm: Create ETE decoder
        perf cs-etm: Update OpenCSD decoder for ETE
        perf cs-etm: Fix typo
        perf cs-etm: Save TRCDEVARCH register
        perf cs-etm: Refactor out ETMv4 header saving
        perf cs-etm: Initialise architecture based on TRCIDR1
        perf cs-etm: Refactor initialisation of decoder params.
        tools build: Fix feature detect clean for out of source builds
        perf evlist: Add evlist__for_each_entry_from() macro
        perf evsel: Handle precise_ip fallback in evsel__open_cpu()
        perf evsel: Move bpf_counter__install_pe() to success path in evsel__open_cpu()
        perf evsel: Move test_attr__open() to success path in evsel__open_cpu()
        perf evsel: Move ignore_missing_thread() to fallback code
        ...
      27151f17
    • Linus Torvalds's avatar
      Merge tag 'trace-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · 58ca2415
      Linus Torvalds authored
      Pull tracing updates from Steven Rostedt:
      
       - simplify the Kconfig use of FTRACE and TRACE_IRQFLAGS_SUPPORT
      
       - bootconfig can now start histograms
      
       - bootconfig supports group/all enabling
      
       - histograms now can put values in linear size buckets
      
       - execnames can be passed to synthetic events
      
       - introduce "event probes" that attach to other events and can retrieve
         data from pointers of fields, or record fields as different types (a
         pointer to a string as a string instead of just a hex number)
      
       - various fixes and clean ups
      
      * tag 'trace-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (35 commits)
        tracing/doc: Fix table format in histogram code
        selftests/ftrace: Add selftest for testing duplicate eprobes and kprobes
        selftests/ftrace: Add selftest for testing eprobe events on synthetic events
        selftests/ftrace: Add test case to test adding and removing of event probe
        selftests/ftrace: Fix requirement check of README file
        selftests/ftrace: Add clear_dynamic_events() to test cases
        tracing: Add a probe that attaches to trace events
        tracing/probes: Reject events which have the same name of existing one
        tracing/probes: Have process_fetch_insn() take a void * instead of pt_regs
        tracing/probe: Change traceprobe_set_print_fmt() to take a type
        tracing/probes: Use struct_size() instead of defining custom macros
        tracing/probes: Allow for dot delimiter as well as slash for system names
        tracing/probe: Have traceprobe_parse_probe_arg() take a const arg
        tracing: Have dynamic events have a ref counter
        tracing: Add DYNAMIC flag for dynamic events
        tracing: Replace deprecated CPU-hotplug functions.
        MAINTAINERS: Add an entry for os noise/latency
        tracepoint: Fix kerneldoc comments
        bootconfig/tracing/ktest: Update ktest example for boot-time tracing
        tools/bootconfig: Use per-group/all enable option in ftrace2bconf script
        ...
      58ca2415
    • Linus Torvalds's avatar
      Merge tag 'arc-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc · e07af262
      Linus Torvalds authored
      Pull ARC updates from Vineet Gupta:
       "Finally a big pile of changes for ARC (atomics/mm). These are from our
        internal arc64 tree, preparing mainline for eventual arc64 support.
        I'm spreading them out to avoid tsunami of patches in one release.
      
         - MM rework:
             - Implement up to 4 paging levels
             - Enable STRICT_MM_TYPECHECK
             - switch pgtable_t back to 'struct page *'
      
         - Atomics rework / implement relaxed accessors
      
         - Retire legacy MMUv1,v2; ARC750 cores
      
         - A few other build errors, typos"
      
      * tag 'arc-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: (33 commits)
        ARC: mm: vmalloc sync from kernel to user table to update PMD ...
        ARC: mm: support 4 levels of page tables
        ARC: mm: support 3 levels of page tables
        ARC: mm: switch to asm-generic/pgalloc.h
        ARC: mm: switch pgtable_t back to struct page *
        ARC: mm: hack to allow 2 level build with 4 level code
        ARC: mm: disintegrate pgtable.h into levels and flags
        ARC: mm: disintegrate mmu.h (arcv2 bits out)
        ARC: mm: move MMU specific bits out of entry code ...
        ARC: mm: move MMU specific bits out of ASID allocator
        ARC: mm: non-functional code movement/cleanup
        ARC: mm: pmd_populate* to use the canonical set_pmd (and drop pmd_set)
        ARC: ioremap: use more commonly used PAGE_KERNEL based uncached flag
        ARC: mm: Enable STRICT_MM_TYPECHECKS
        ARC: mm: Fixes to allow STRICT_MM_TYPECHECKS
        ARC: mm: move mmu/cache externs out to setup.h
        ARC: mm: remove tlb paranoid code
        ARC: mm: use SCRATCH_DATA0 register for caching pgdir in ARCv2 only
        ARC: retire MMUv1 and MMUv2 support
        ARC: retire ARC750 support
        ...
      e07af262
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-5.15-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 063df71a
      Linus Torvalds authored
      Pull RISC-V updates from Palmer Dabbelt:
      
       - support PC-relative instructions (auipc and branches) in kprobes
      
       - support for forced IRQ threading
      
       - support for the hlt/nohlt kernel command line options, via the
         generic idle loop
      
       - show the edge/level triggered behavior of interrupts
         in /proc/interrupts
      
       - a handful of cleanups to our address mapping mechanisms
      
       - support for allocating gigantic hugepages via CMA
      
       - support for the undefined behavior sanitizer (UBSAN)
      
       - a handful of cleanups to the VDSO that allow the kernel to build with
         LLD.
      
       - support for hugepage migration
      
      * tag 'riscv-for-linus-5.15-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (21 commits)
        riscv: add support for hugepage migration
        RISC-V: Fix VDSO build for !MMU
        riscv: use strscpy to replace strlcpy
        riscv: explicitly use symbol offsets for VDSO
        riscv: Enable Undefined Behavior Sanitizer UBSAN
        riscv: Keep the riscv Kconfig selects sorted
        riscv: Support allocating gigantic hugepages using CMA
        riscv: fix the global name pfn_base confliction error
        riscv: Move early fdt mapping creation in its own function
        riscv: Simplify BUILTIN_DTB device tree mapping handling
        riscv: Use __maybe_unused instead of #ifdefs around variable declarations
        riscv: Get rid of map_size parameter to create_kernel_page_table
        riscv: Introduce va_kernel_pa_offset for 32-bit kernel
        riscv: Optimize kernel virtual address conversion macro
        dt-bindings: riscv: add starfive jh7100 bindings
        riscv: Enable GENERIC_IRQ_SHOW_LEVEL
        riscv: Enable idle generic idle loop
        riscv: Allow forced irq threading
        riscv: Implement thread_struct whitelist for hardened usercopy
        riscv: kprobes: implement the branch instructions
        ...
      063df71a
    • Linus Torvalds's avatar
      Enable '-Werror' by default for all kernel builds · 3fe617cc
      Linus Torvalds authored
      ... but make it a config option so that broken environments can disable
      it when required.
      
      We really should always have a clean build, and will disable specific
      over-eager warnings as required, if we can't fix them.  But while I
      fairly religiously enforce that in my own tree, it doesn't get enforced
      by various build robots that don't necessarily report warnings.
      
      So this just makes '-Werror' a default compiler flag, but allows people
      to disable it for their configuration if they have some particular
      issues.
      
      Occasionally, new compiler versions end up enabling new warnings, and it
      can take a while before we have them fixed (or the warnings disabled if
      that is what it takes), so the config option allows for that situation.
      
      Hopefully this will mean that I get fewer pull requests that have new
      warnings that were not noticed by various automation we have in place.
      
      Knock wood.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3fe617cc
    • Linus Torvalds's avatar
      Merge tag 'usb-5.15-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · fd47ff55
      Linus Torvalds authored
      Pull more USB updates from Greg KH:
       "Here are some straggler USB-serial changes for 5.15-rc1.
      
        These were not included in the first pull request as they came in
        "late" from Johan and I had missed them in my pull request earlier
        this week.
      
        Nothing big in here, just some USB to serial driver updates and fixes.
        All of these were in linux-next before I pulled them into my tree, and
        have been in linux-next all this week from my tree with no reported
        problems"
      
      * tag 'usb-5.15-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        USB: serial: pl2303: fix GL type detection
        USB: serial: replace symbolic permissions by octal permissions
        USB: serial: cp210x: determine fw version for CP2105 and CP2108
        USB: serial: cp210x: clean up type detection
        USB: serial: cp210x: clean up set-chars request
        USB: serial: cp210x: clean up control-request timeout
        USB: serial: cp210x: fix flow-control error handling
        USB: serial: cp210x: fix control-characters error handling
        USB: serial: io_edgeport: drop unused descriptor helper
      fd47ff55
    • Linus Torvalds's avatar
      Merge tag 'mtd/for-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux · 6b6dc4f4
      Linus Torvalds authored
      Pull MTD updates from Miquel Raynal:
       "MTD changes:
         - blkdevs:
             - Simplify the refcounting in blktrans_{open, release}
             - Simplify blktrans_getgeo
             - Remove blktrans_ref_mutex
             - Simplify blktrans_dev_get
             - Use lockdep_assert_held
             - Don't hold del_mtd_blktrans_dev in blktrans_{open, release}
         - ftl:
             - Don't cast away the type when calling add_mtd_blktrans_dev
             - Don't cast away the type when calling add_mtd_blktrans_dev
             - Use container_of() rather than cast
             - Fix use-after-free
             - Add discard support
             - Allow use of MTD_RAM for testing purposes
         - concat:
             - Check _read, _write callbacks existence before assignment
             - Judge callback existence based on the master
         - maps:
             - Maps: remove dead MTD map driver for PMC-Sierra MSP boards
         - mtdblock:
             - Warn if added for a NAND device
             - Add comment about UBI block devices
             - Update old JFFS2 mention in Kconfig
         - partitions:
             - Redboot: convert to YAML
      
        NAND core changes:
         - Repair Miquel Raynal's email address in MAINTAINERS
         - Fix a couple of spelling mistakes in Kconfig
         - bbt: Skip bad blocks when searching for the BBT in NAND
         - Remove never changed ret variable
      
        Raw NAND changes:
         - cafe: Fix a resource leak in the error handling path of 'cafe_nand_probe()'
         - intel: Fix error handling in probe
         - omap: Fix kernel doc warning on 'calcuate' typo
         - gpmc: Fix the ECC bytes vs. OOB bytes equation
      
        SPI-NAND core changes:
         - Properly fill the OOB area.
         - Fix comment
      
        SPI-NAND drivers changes:
         - macronix: Add Quad support for serial NAND flash"
      
      * tag 'mtd/for-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (30 commits)
        mtd: rawnand: cafe: Fix a resource leak in the error handling path of 'cafe_nand_probe()'
        mtd_blkdevs: simplify the refcounting in blktrans_{open, release}
        mtd_blkdevs: simplify blktrans_getgeo
        mtd_blkdevs: remove blktrans_ref_mutex
        mtd_blkdevs: simplify blktrans_dev_get
        mtd/rfd_ftl: don't cast away the type when calling add_mtd_blktrans_dev
        mtd/ftl: don't cast away the type when calling add_mtd_blktrans_dev
        mtd_blkdevs: use lockdep_assert_held
        mtd_blkdevs: don't hold del_mtd_blktrans_dev in blktrans_{open, release}
        mtd: rawnand: intel: Fix error handling in probe
        mtd: mtdconcat: Check _read, _write callbacks existence before assignment
        mtd: mtdconcat: Judge callback existence based on the master
        mtd: maps: remove dead MTD map driver for PMC-Sierra MSP boards
        mtd: rfd_ftl: use container_of() rather than cast
        mtd: rfd_ftl: fix use-after-free
        mtd: rfd_ftl: add discard support
        mtd: rfd_ftl: allow use of MTD_RAM for testing purposes
        mtdblock: Warn if added for a NAND device
        mtd: spinand: macronix: Add Quad support for serial NAND flash
        mtdblock: Add comment about UBI block devices
        ...
      6b6dc4f4
    • Geert Uytterhoeven's avatar
      binfmt: a.out: Fix bogus semicolon · 0319b848
      Geert Uytterhoeven authored
          fs/binfmt_aout.c: In function ‘load_aout_library’:
          fs/binfmt_aout.c:311:27: error: expected ‘)’ before ‘;’ token
            311 |    MAP_FIXED | MAP_PRIVATE;
      	  |                           ^
          fs/binfmt_aout.c:309:10: error: too few arguments to function ‘vm_mmap’
            309 |  error = vm_mmap(file, start_addr, ex.a_text + ex.a_data,
      	  |          ^~~~~~~
          In file included from fs/binfmt_aout.c:12:
          include/linux/mm.h:2626:35: note: declared here
           2626 | extern unsigned long __must_check vm_mmap(struct file *, unsigned long,
      	  |                                   ^~~~~~~
      
      Fix this by reverting the accidental replacement of a comma by a
      semicolon.
      
      Fixes: 42be8b42 ("binfmt: don't use MAP_DENYWRITE when loading shared libraries via uselib()")
      Reported-by: noreply@ellerman.id.au
      Reported-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      0319b848
  4. 04 Sep, 2021 6 commits
    • Yang Li's avatar
      NTB: perf: Fix an error code in perf_setup_inbuf() · 0097ae5f
      Yang Li authored
      When the function IS_ALIGNED() returns false, the value of ret is 0.
      So, we set ret to -EINVAL to indicate this error.
      
      Clean up smatch warning:
      drivers/ntb/test/ntb_perf.c:602 perf_setup_inbuf() warn: missing error
      code 'ret'.
      Reported-by: default avatarAbaci Robot <abaci@linux.alibaba.com>
      Signed-off-by: default avatarYang Li <yang.lee@linux.alibaba.com>
      Reviewed-by: default avatarSerge Semin <fancer.lancer@gmail.com>
      Signed-off-by: default avatarJon Mason <jdmason@kudzu.us>
      0097ae5f
    • Yang Li's avatar
      NTB: Fix an error code in ntb_msit_probe() · 319f83ac
      Yang Li authored
      When the value of nm->isr_ctx is false, the value of ret is 0.
      So, we set ret to -ENOMEM to indicate this error.
      
      Clean up smatch warning:
      drivers/ntb/test/ntb_msi_test.c:373 ntb_msit_probe() warn: missing
      error code 'ret'.
      Reported-by: default avatarAbaci Robot <abaci@linux.alibaba.com>
      Signed-off-by: default avatarYang Li <yang.lee@linux.alibaba.com>
      Reviewed-by: default avatarLogan Gunthorpe <logang@deltatee.com>
      Signed-off-by: default avatarJon Mason <jdmason@kudzu.us>
      319f83ac
    • Dave Jiang's avatar
      ntb: intel: remove invalid email address in header comment · f3b6b10f
      Dave Jiang authored
      Remove Jon's old email address.
      Signed-off-by: default avatarDave Jiang <dave.jiang@intel.com>
      Signed-off-by: default avatarJon Mason <jdmason@kudzu.us>
      f3b6b10f
    • Linus Torvalds's avatar
      Merge tag 'denywrite-for-5.15' of git://github.com/davidhildenbrand/linux · 49624efa
      Linus Torvalds authored
      Pull MAP_DENYWRITE removal from David Hildenbrand:
       "Remove all in-tree usage of MAP_DENYWRITE from the kernel and remove
        VM_DENYWRITE.
      
        There are some (minor) user-visible changes:
      
         - We no longer deny write access to shared libaries loaded via legacy
           uselib(); this behavior matches modern user space e.g. dlopen().
      
         - We no longer deny write access to the elf interpreter after exec
           completed, treating it just like shared libraries (which it often
           is).
      
         - We always deny write access to the file linked via /proc/pid/exe:
           sys_prctl(PR_SET_MM_MAP/EXE_FILE) will fail if write access to the
           file cannot be denied, and write access to the file will remain
           denied until the link is effectivel gone (exec, termination,
           sys_prctl(PR_SET_MM_MAP/EXE_FILE)) -- just as if exec'ing the file.
      
        Cross-compiled for a bunch of architectures (alpha, microblaze, i386,
        s390x, ...) and verified via ltp that especially the relevant tests
        (i.e., creat07 and execve04) continue working as expected"
      
      * tag 'denywrite-for-5.15' of git://github.com/davidhildenbrand/linux:
        fs: update documentation of get_write_access() and friends
        mm: ignore MAP_DENYWRITE in ksys_mmap_pgoff()
        mm: remove VM_DENYWRITE
        binfmt: remove in-tree usage of MAP_DENYWRITE
        kernel/fork: always deny write access to current MM exe_file
        kernel/fork: factor out replacing the current MM exe_file
        binfmt: don't use MAP_DENYWRITE when loading shared libraries via uselib()
      49624efa
    • Linus Torvalds's avatar
      Merge git://github.com/Paragon-Software-Group/linux-ntfs3 · f7464060
      Linus Torvalds authored
      Merge NTFSv3 filesystem from Konstantin Komarov:
       "This patch adds NTFS Read-Write driver to fs/ntfs3.
      
        Having decades of expertise in commercial file systems development and
        huge test coverage, we at Paragon Software GmbH want to make our
        contribution to the Open Source Community by providing implementation
        of NTFS Read-Write driver for the Linux Kernel.
      
        This is fully functional NTFS Read-Write driver. Current version works
        with NTFS (including v3.1) and normal/compressed/sparse files and
        supports journal replaying.
      
        We plan to support this version after the codebase once merged, and
        add new features and fix bugs. For example, full journaling support
        over JBD will be added in later updates"
      
      Link: https://lore.kernel.org/lkml/20210729134943.778917-1-almaz.alexandrovich@paragon-software.com/
      Link: https://lore.kernel.org/lkml/aa4aa155-b9b2-9099-b7a2-349d8d9d8fbd@paragon-software.com/
      
      * git://github.com/Paragon-Software-Group/linux-ntfs3: (35 commits)
        fs/ntfs3: Change how module init/info messages are displayed
        fs/ntfs3: Remove GPL boilerplates from decompress lib files
        fs/ntfs3: Remove unnecessary condition checking from ntfs_file_read_iter
        fs/ntfs3: Fix integer overflow in ni_fiemap with fiemap_prep()
        fs/ntfs3: Restyle comments to better align with kernel-doc
        fs/ntfs3: Rework file operations
        fs/ntfs3: Remove fat ioctl's from ntfs3 driver for now
        fs/ntfs3: Restyle comments to better align with kernel-doc
        fs/ntfs3: Fix error handling in indx_insert_into_root()
        fs/ntfs3: Potential NULL dereference in hdr_find_split()
        fs/ntfs3: Fix error code in indx_add_allocate()
        fs/ntfs3: fix an error code in ntfs_get_acl_ex()
        fs/ntfs3: add checks for allocation failure
        fs/ntfs3: Use kcalloc/kmalloc_array over kzalloc/kmalloc
        fs/ntfs3: Do not use driver own alloc wrappers
        fs/ntfs3: Use kernel ALIGN macros over driver specific
        fs/ntfs3: Restyle comment block in ni_parse_reparse()
        fs/ntfs3: Remove unused including <linux/version.h>
        fs/ntfs3: Fix fall-through warnings for Clang
        fs/ntfs3: Fix one none utf8 char in source file
        ...
      f7464060
    • Linus Torvalds's avatar
      Merge tag 'f2fs-for-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs · 6abaa83c
      Linus Torvalds authored
      Pull f2fs updates from Jaegeuk Kim:
       "In this cycle, we've addressed some performance issues such as lock
        contention, misbehaving compress_cache, allowing extent_cache for
        compressed files, and new sysfs to adjust ra_size for fadvise.
      
        In order to diagnose the performance issues quickly, we also added an
        iostat which shows the IO latencies periodically.
      
        On the stability side, we've found two memory leakage cases in the
        error path in compression flow. And, we've also fixed various corner
        cases in fiemap, quota, checkpoint=disable, zstd, and so on.
      
        Enhancements:
         - avoid long checkpoint latency by releasing nat_tree_lock
         - collect and show iostats periodically
         - support extent_cache for compressed files
         - add a sysfs entry to manage ra_size given fadvise(POSIX_FADV_SEQUENTIAL)
         - report f2fs GC status via sysfs
         - add discard_unit=%s in mount option to handle zoned device
      
        Bug fixes:
         - fix two memory leakages when an error happens in the compressed IO flow
         - fix commpress_cache to get the right LBA
         - fix fiemap to deal with compressed case correctly
         - fix wrong EIO returns due to SBI_NEED_FSCK
         - fix missing writes when enabling checkpoint back
         - fix quota deadlock
         - fix zstd level mount option
      
        In addition to the above major updates, we've cleaned up several code
        paths such as dio, unnecessary operations, debugfs/f2fs/status, sanity
        check, and typos"
      
      * tag 'f2fs-for-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (46 commits)
        f2fs: should put a page beyond EOF when preparing a write
        f2fs: deallocate compressed pages when error happens
        f2fs: enable realtime discard iff device supports discard
        f2fs: guarantee to write dirty data when enabling checkpoint back
        f2fs: fix to unmap pages from userspace process in punch_hole()
        f2fs: fix unexpected ENOENT comes from f2fs_map_blocks()
        f2fs: fix to account missing .skipped_gc_rwsem
        f2fs: adjust unlock order for cleanup
        f2fs: Don't create discard thread when device doesn't support realtime discard
        f2fs: rebuild nat_bits during umount
        f2fs: introduce periodic iostat io latency traces
        f2fs: separate out iostat feature
        f2fs: compress: do sanity check on cluster
        f2fs: fix description about main_blkaddr node
        f2fs: convert S_IRUGO to 0444
        f2fs: fix to keep compatibility of fault injection interface
        f2fs: support fault injection for f2fs_kmem_cache_alloc()
        f2fs: compress: allow write compress released file after truncate to zero
        f2fs: correct comment in segment.h
        f2fs: improve sbi status info in debugfs/f2fs/status
        ...
      6abaa83c