1. 04 Jun, 2018 18 commits
    • Linus Torvalds's avatar
      Merge tag 'affs-for-4.18-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · e3a44fd7
      Linus Torvalds authored
      Pull affs fix from David Sterba:
       "A potential memory leak fix for AFFS"
      
      * tag 'affs-for-4.18-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        affs: fix potential memory leak when parsing option 'prefix'
      e3a44fd7
    • Linus Torvalds's avatar
      Merge branch 'work.aio-1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 408afb8d
      Linus Torvalds authored
      Pull aio updates from Al Viro:
       "Majority of AIO stuff this cycle. aio-fsync and aio-poll, mostly.
      
        The only thing I'm holding back for a day or so is Adam's aio ioprio -
        his last-minute fixup is trivial (missing stub in !CONFIG_BLOCK case),
        but let it sit in -next for decency sake..."
      
      * 'work.aio-1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (46 commits)
        aio: sanitize the limit checking in io_submit(2)
        aio: fold do_io_submit() into callers
        aio: shift copyin of iocb into io_submit_one()
        aio_read_events_ring(): make a bit more readable
        aio: all callers of aio_{read,write,fsync,poll} treat 0 and -EIOCBQUEUED the same way
        aio: take list removal to (some) callers of aio_complete()
        aio: add missing break for the IOCB_CMD_FDSYNC case
        random: convert to ->poll_mask
        timerfd: convert to ->poll_mask
        eventfd: switch to ->poll_mask
        pipe: convert to ->poll_mask
        crypto: af_alg: convert to ->poll_mask
        net/rxrpc: convert to ->poll_mask
        net/iucv: convert to ->poll_mask
        net/phonet: convert to ->poll_mask
        net/nfc: convert to ->poll_mask
        net/caif: convert to ->poll_mask
        net/bluetooth: convert to ->poll_mask
        net/sctp: convert to ->poll_mask
        net/tipc: convert to ->poll_mask
        ...
      408afb8d
    • Linus Torvalds's avatar
      Merge branch 'work.lookup' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · b058efc1
      Linus Torvalds authored
      Pull dcache lookup cleanups from Al Viro:
       "Cleaning ->lookup() instances up - mostly d_splice_alias() conversions"
      
      * 'work.lookup' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (29 commits)
        switch the rest of procfs lookups to d_splice_alias()
        procfs: switch instantiate_t to d_splice_alias()
        don't bother with tid_fd_revalidate() in lookups
        proc_lookupfd_common(): don't bother with instantiate unless the file is open
        procfs: get rid of ancient BS in pid_revalidate() uses
        cifs_lookup(): switch to d_splice_alias()
        cifs_lookup(): cifs_get_inode_...() never returns 0 with *inode left NULL
        9p: unify paths in v9fs_vfs_lookup()
        ncp_lookup(): use d_splice_alias()
        hfsplus: switch to d_splice_alias()
        hfs: don't allow mounting over .../rsrc
        hfs: use d_splice_alias()
        omfs_lookup(): report IO errors, use d_splice_alias()
        orangefs_lookup: simplify
        openpromfs: switch to d_splice_alias()
        xfs_vn_lookup: simplify a bit
        adfs_lookup: do not fail with ENOENT on negatives, use d_splice_alias()
        adfs_lookup_byname: .. *is* taken care of in fs/namei.c
        romfs_lookup: switch to d_splice_alias()
        qnx6_lookup: switch to d_splice_alias()
        ...
      b058efc1
    • Linus Torvalds's avatar
      Merge tag 'locks-v4.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux · 9214407d
      Linus Torvalds authored
      Pull fasync fix from Jeff Layton:
       "Just a single fix for a deadlock in the fasync handling code that
        Kirill observed while testing.
      
        The fix is to change the fa_lock to be rwlock_t, and use a read lock
        in kill_fasync_rcu"
      
      * tag 'locks-v4.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux:
        fasync: Fix deadlock between task-context and interrupt-context kill_fasync()
      9214407d
    • Linus Torvalds's avatar
      Merge tag 'docs-4.18' of git://git.lwn.net/linux · eeee3149
      Linus Torvalds authored
      Pull documentation updates from Jonathan Corbet:
       "There's been a fair amount of work in the docs tree this time around,
        including:
      
         - Extensive RST conversions and organizational work in the
           memory-management docs thanks to Mike Rapoport.
      
         - An update of Documentation/features from Andrea Parri and a script
           to keep it updated.
      
         - Various LICENSES updates from Thomas, along with a script to check
           SPDX tags.
      
         - Work to fix dangling references to documentation files; this
           involved a fair number of one-liner comment changes outside of
           Documentation/
      
        ... and the usual list of documentation improvements, typo fixes, etc"
      
      * tag 'docs-4.18' of git://git.lwn.net/linux: (103 commits)
        Documentation: document hung_task_panic kernel parameter
        docs/admin-guide/mm: add high level concepts overview
        docs/vm: move ksm and transhuge from "user" to "internals" section.
        docs: Use the kerneldoc comments for memalloc_no*()
        doc: document scope NOFS, NOIO APIs
        docs: update kernel versions and dates in tables
        docs/vm: transhuge: split userspace bits to admin-guide/mm/transhuge
        docs/vm: transhuge: minor updates
        docs/vm: transhuge: change sections order
        Documentation: arm: clean up Marvell Berlin family info
        Documentation: gpio: driver: Fix a typo and some odd grammar
        docs: ranoops.rst: fix location of ramoops.txt
        scripts/documentation-file-ref-check: rewrite it in perl with auto-fix mode
        docs: uio-howto.rst: use a code block to solve a warning
        mm, THP, doc: Add document for thp_swpout/thp_swpout_fallback
        w1: w1_io.c: fix a kernel-doc warning
        Documentation/process/posting: wrap text at 80 cols
        docs: admin-guide: add cgroup-v2 documentation
        Revert "Documentation/features/vm: Remove arch support status file for 'pte_special'"
        Documentation: refcount-vs-atomic: Update reference to LKMM doc.
        ...
      eeee3149
    • Linus Torvalds's avatar
      swait: strengthen language to discourage use · c5e7a7ea
      Linus Torvalds authored
      We already earlier discouraged people from using this interface in
      commit 88796e7e ("sched/swait: Document it clearly that the swait
      facilities are special and shouldn't be used"), but I just got a pull
      request with a new broken user.
      
      So make the comment *really* clear.
      
      The swait interfaces are bad, and should not be used unless you have
      some *very* strong reasons that include tons of hard performance numbers
      on just why you want to use them, and you show that you actually
      understand that they aren't at all like the normal wait/wakeup
      interfaces.
      
      So far, every single user has been suspect.  The main user is KVM, which
      is completely pointless (there is only ever one waiter, which avoids the
      interface subtleties, but also means that having a queue instead of a
      pointer is counter-productive and certainly not an "optimization").
      
      So make the comments much stronger.
      
      Not that anybody likely reads them anyway, but there's always some
      slight hope that it will cause somebody to think twice.
      
      I'd like to remove this interface entirely, but there is the theoretical
      possibility that it's actually the right thing to use in some situation,
      most likely some deep RT use.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c5e7a7ea
    • Linus Torvalds's avatar
      Merge tag 'regmap-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap · a31895ad
      Linus Torvalds authored
      Pull regmap updates from Mark Brown:
       "This is another quiet release for regmap, there's one minor feature
        improvement for the recently added slimbus support and a few minor
        fixes and cleanups"
      
      * tag 'regmap-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
        regmap: slimbus: allow register offsets up to 16 bits
        regmap: add missing prototype for devm_init_slimbus
        regmap: Skip clk_put for attached clocks when freeing context
        regmap: include <linux/ktime.h> from include/linux/regmap.h
      a31895ad
    • Linus Torvalds's avatar
      Merge tag 'spi-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · cfd12db4
      Linus Torvalds authored
      Pull spi updates from Mark Brown:
       "Quite a busy release for SPI, mainly as a result of Boris Brezillon's
        work on improving the integration with MTD for accelerated SPI flash
        controllers. He's added a new spi_mem interface which works a lot
        better with general hardware and converted the users over to it, as a
        result of this work we've got some MTD changes in here as well.
      
        Other highlights include:
      
         - Lots of spring cleaning for the s3c64xx driver.
      
         - Removal of the bcm53xx, the hardware is also supported by the mspi
           driver but SoC naming had caused people to miss the duplication.
      
         - Conversion of the pxa2xx driver to use the standard message
           processing loop rather than open coding.
      
         - A bunch of improvements to the runtime PM of the OMAP McSPI driver"
      
      * tag 'spi-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (47 commits)
        spi: Fix typo on SPI_MEM help text
        spi: sh-msiof: Fix setting SIRMDR1.SYNCAC to match SITMDR1.SYNCAC
        mtd: devices: m25p80: Use spi_mem_set_drvdata() instead of spi_set_drvdata()
        spi: omap2-mcspi: Remove unnecessary pm_runtime_force_suspend()
        spi: Add missing pm_runtime_put_noidle() after failed get
        spi: ti-qspi: Make sure res_mmap != NULL before dereferencing it
        spi: spi-s3c64xx: Fix system resume support
        spi: bcm-qspi: Fix build failure caused by spi_flash_read() API removal
        spi: Get rid of the spi_flash_read() API
        mtd: spi-nor: Use the spi_mem_xx() API
        spi: ti-qspi: Implement the spi_mem interface
        spi: bcm-qspi: Implement the spi_mem interface
        spi: Make support for regular transfers optional when ->mem_ops != NULL
        spi: Extend the core to ease integration of SPI memory controllers
        spi: remove forgotten CONFIG_SPI_BCM53XX
        spi: remove the older/duplicated bcm53xx driver
        spi: pxa2xx: check clk_prepare_enable() return value
        spi: lpspi: Switch to SPDX identifier
        spi: mxs: Switch to SPDX identifier
        spi: imx: Switch to SPDX identifier
        ...
      cfd12db4
    • Linus Torvalds's avatar
      Merge tag 'chrome-platform-for-linus-4.18' of... · 910470e0
      Linus Torvalds authored
      Merge tag 'chrome-platform-for-linus-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform
      
      Pull chrome platform updates from Benson Leung:
      
       - further changes from Dmitry related to the removal of platform data
         from atmel_mxt_ts and chromeos_laptop.
      
         This time, we have some changes that teach chromeos_laptop how to
         supply acpi properties for some input devices so that the peripheral
         driver doesn't have to do dmi matching on some Chromebook platforms.
      
       - new Chromebook Tablet switch driver, which is useful for x86
         convertible Chromebooks.
      
       - other misc cleanup
      
      * tag 'chrome-platform-for-linus-4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform:
        platform/chrome: Use to_cros_ec_dev more broadly
        platform/chrome: chromeos_laptop: fix touchpad button mapping on Celes
        platform: chrome: Add input dependency for tablet switch driver
        platform/chrome: chromeos_laptop - supply properties for ACPI devices
        platform/chrome: chromeos_tbmc - add SPDX identifier
        platform: chrome: Add Tablet Switch ACPI driver
        platform/chrome: cros_ec_lpc: do not try DMI match when ACPI device found
      910470e0
    • Linus Torvalds's avatar
      Merge tag 'hwmon-for-linus-v4.18' of... · bef82f81
      Linus Torvalds authored
      Merge tag 'hwmon-for-linus-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
      
      Pull hwmon updates from Guenter Roeck:
      
       - asus_atk0110 driver modified to use new API
      
       - k10temp supports new CPUs and reports both Tctl and Tdie
      
       - minor fixes in gpio-fan, ltc2990, fschmd, and mc13783 drivers
      
      * tag 'hwmon-for-linus-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        hwmon: (asus_atk0110) Make use of device managed memory
        hwmon: (asus_atk0110) Replace deprecated device register call
        hwmon: (k10temp) Make function get_raw_temp static
        hwmon: (gpio-fan) Fix "#cooling-cells" property name in bindings
        MAINTAINERS: hwmon: Add Documentation/devicetree/bindings/hwmon
        hwmon: (ltc2990) support all measurement modes
        hwmon: (ltc2990) add devicetree binding
        hwmon: (ltc2990) Fix incorrect conversion of negative temperatures
        hwmon: (core) check parent dev != NULL when chip != NULL
        hwmon: (fschmd) fix typo 'can by' to 'can be'
        hwmon: (k10temp) Display both Tctl and Tdie
        hwmon: (k10temp) Add support for Stoney Ridge and Bristol Ridge CPUs
        hwmon: MC13783: Add uid and die temperature sensor inputs
      bef82f81
    • Linus Torvalds's avatar
      Merge tag 'dma-mapping-4.18' of git://git.infradead.org/users/hch/dma-mapping · e5a59464
      Linus Torvalds authored
      Pull dma-mapping updates from Christoph Hellwig:
      
       - replace the force_dma flag with a dma_configure bus method. (Nipun
         Gupta, although one patch is іncorrectly attributed to me due to a
         git rebase bug)
      
       - use GFP_DMA32 more agressively in dma-direct. (Takashi Iwai)
      
       - remove PCI_DMA_BUS_IS_PHYS and rely on the dma-mapping API to do the
         right thing for bounce buffering.
      
       - move dma-debug initialization to common code, and apply a few
         cleanups to the dma-debug code.
      
       - cleanup the Kconfig mess around swiotlb selection
      
       - swiotlb comment fixup (Yisheng Xie)
      
       - a trivial swiotlb fix. (Dan Carpenter)
      
       - support swiotlb on RISC-V. (based on a patch from Palmer Dabbelt)
      
       - add a new generic dma-noncoherent dma_map_ops implementation and use
         it for arc, c6x and nds32.
      
       - improve scatterlist validity checking in dma-debug. (Robin Murphy)
      
       - add a struct device quirk to limit the dma-mask to 32-bit due to
         bridge/system issues, and switch x86 to use it instead of a local
         hack for VIA bridges.
      
       - handle devices without a dma_mask more gracefully in the dma-direct
         code.
      
      * tag 'dma-mapping-4.18' of git://git.infradead.org/users/hch/dma-mapping: (48 commits)
        dma-direct: don't crash on device without dma_mask
        nds32: use generic dma_noncoherent_ops
        nds32: implement the unmap_sg DMA operation
        nds32: consolidate DMA cache maintainance routines
        x86/pci-dma: switch the VIA 32-bit DMA quirk to use the struct device flag
        x86/pci-dma: remove the explicit nodac and allowdac option
        x86/pci-dma: remove the experimental forcesac boot option
        Documentation/x86: remove a stray reference to pci-nommu.c
        core, dma-direct: add a flag 32-bit dma limits
        dma-mapping: remove unused gfp_t parameter to arch_dma_alloc_attrs
        dma-debug: check scatterlist segments
        c6x: use generic dma_noncoherent_ops
        arc: use generic dma_noncoherent_ops
        arc: fix arc_dma_{map,unmap}_page
        arc: fix arc_dma_sync_sg_for_{cpu,device}
        arc: simplify arc_dma_sync_single_for_{cpu,device}
        dma-mapping: provide a generic dma-noncoherent implementation
        dma-mapping: simplify Kconfig dependencies
        riscv: add swiotlb support
        riscv: only enable ZONE_DMA32 for 64-bit
        ...
      e5a59464
    • Linus Torvalds's avatar
      Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · f956d08a
      Linus Torvalds authored
      Pull misc vfs updates from Al Viro:
       "Misc bits and pieces not fitting into anything more specific"
      
      * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        vfs: delete unnecessary assignment in vfs_listxattr
        Documentation: filesystems: update filesystem locking documentation
        vfs: namei: use path_equal() in follow_dotdot()
        fs.h: fix outdated comment about file flags
        __inode_security_revalidate() never gets NULL opt_dentry
        make xattr_getsecurity() static
        vfat: simplify checks in vfat_lookup()
        get rid of dead code in d_find_alias()
        it's SB_BORN, not MS_BORN...
        msdos_rmdir(): kill BS comment
        remove rpc_rmdir()
        fs: avoid fdput() after failed fdget() in vfs_dedupe_file_range()
      f956d08a
    • Linus Torvalds's avatar
      Merge branch 'hch.procfs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · cf626b0d
      Linus Torvalds authored
      Pull procfs updates from Al Viro:
       "Christoph's proc_create_... cleanups series"
      
      * 'hch.procfs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (44 commits)
        xfs, proc: hide unused xfs procfs helpers
        isdn/gigaset: add back gigaset_procinfo assignment
        proc: update SIZEOF_PDE_INLINE_NAME for the new pde fields
        tty: replace ->proc_fops with ->proc_show
        ide: replace ->proc_fops with ->proc_show
        ide: remove ide_driver_proc_write
        isdn: replace ->proc_fops with ->proc_show
        atm: switch to proc_create_seq_private
        atm: simplify procfs code
        bluetooth: switch to proc_create_seq_data
        netfilter/x_tables: switch to proc_create_seq_private
        netfilter/xt_hashlimit: switch to proc_create_{seq,single}_data
        neigh: switch to proc_create_seq_data
        hostap: switch to proc_create_{seq,single}_data
        bonding: switch to proc_create_seq_data
        rtc/proc: switch to proc_create_single_data
        drbd: switch to proc_create_single
        resource: switch to proc_create_seq_data
        staging/rtl8192u: simplify procfs code
        jfs: simplify procfs code
        ...
      cf626b0d
    • Linus Torvalds's avatar
      Merge branch 'work.rmdir' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 9c50eafc
      Linus Torvalds authored
      Pull rmdir update from Al Viro:
       "More shrink_dcache_parent()-related stuff - killing the main source of
        potentially contended calls of that on large subtrees"
      
      * 'work.rmdir' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        rmdir(),rename(): do shrink_dcache_parent() only on success
      9c50eafc
    • Linus Torvalds's avatar
      Merge branch 'work.dcache' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 06c86e66
      Linus Torvalds authored
      Pull dcache updates from Al Viro:
       "This is the first part of dealing with livelocks etc around
        shrink_dcache_parent()."
      
      * 'work.dcache' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        restore cond_resched() in shrink_dcache_parent()
        dput(): turn into explicit while() loop
        dcache: move cond_resched() into the end of __dentry_kill()
        d_walk(): kill 'finish' callback
        d_invalidate(): unhash immediately
      06c86e66
    • Linus Torvalds's avatar
      Merge tag 'for-4.18/block-20180603' of git://git.kernel.dk/linux-block · f459c345
      Linus Torvalds authored
      Pull block updates from Jens Axboe:
      
       - clean up how we pass around gfp_t and
         blk_mq_req_flags_t (Christoph)
      
       - prepare us to defer scheduler attach (Christoph)
      
       - clean up drivers handling of bounce buffers (Christoph)
      
       - fix timeout handling corner cases (Christoph/Bart/Keith)
      
       - bcache fixes (Coly)
      
       - prep work for bcachefs and some block layer optimizations (Kent).
      
       - convert users of bio_sets to using embedded structs (Kent).
      
       - fixes for the BFQ io scheduler (Paolo/Davide/Filippo)
      
       - lightnvm fixes and improvements (Matias, with contributions from Hans
         and Javier)
      
       - adding discard throttling to blk-wbt (me)
      
       - sbitmap blk-mq-tag handling (me/Omar/Ming).
      
       - remove the sparc jsflash block driver, acked by DaveM.
      
       - Kyber scheduler improvement from Jianchao, making it more friendly
         wrt merging.
      
       - conversion of symbolic proc permissions to octal, from Joe Perches.
         Previously the block parts were a mix of both.
      
       - nbd fixes (Josef and Kevin Vigor)
      
       - unify how we handle the various kinds of timestamps that the block
         core and utility code uses (Omar)
      
       - three NVMe pull requests from Keith and Christoph, bringing AEN to
         feature completeness, file backed namespaces, cq/sq lock split, and
         various fixes
      
       - various little fixes and improvements all over the map
      
      * tag 'for-4.18/block-20180603' of git://git.kernel.dk/linux-block: (196 commits)
        blk-mq: update nr_requests when switching to 'none' scheduler
        block: don't use blocking queue entered for recursive bio submits
        dm-crypt: fix warning in shutdown path
        lightnvm: pblk: take bitmap alloc. out of critical section
        lightnvm: pblk: kick writer on new flush points
        lightnvm: pblk: only try to recover lines with written smeta
        lightnvm: pblk: remove unnecessary bio_get/put
        lightnvm: pblk: add possibility to set write buffer size manually
        lightnvm: fix partial read error path
        lightnvm: proper error handling for pblk_bio_add_pages
        lightnvm: pblk: fix smeta write error path
        lightnvm: pblk: garbage collect lines with failed writes
        lightnvm: pblk: rework write error recovery path
        lightnvm: pblk: remove dead function
        lightnvm: pass flag on graceful teardown to targets
        lightnvm: pblk: check for chunk size before allocating it
        lightnvm: pblk: remove unnecessary argument
        lightnvm: pblk: remove unnecessary indirection
        lightnvm: pblk: return NVM_ error on failed submission
        lightnvm: pblk: warn in case of corrupted write buffer
        ...
      f459c345
    • Mark Brown's avatar
    • Mark Brown's avatar
      16c10b3b
  2. 03 Jun, 2018 9 commits
    • Linus Torvalds's avatar
      Linux 4.17 · 29dcea88
      Linus Torvalds authored
      29dcea88
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 325e14f9
      Linus Torvalds authored
      Pull vfs fixes from Al Viro.
      
       - fix io_destroy()/aio_complete() race
      
       - the vfs_open() change to get rid of open_check_o_direct() boilerplate
         was nice, but buggy. Al has a patch avoiding a revert, but that's
         definitely not a last-day fodder, so for now revert it is...
      
      * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        Revert "fs: fold open_check_o_direct into do_dentry_open"
        fix io_destroy()/aio_complete() race
      325e14f9
    • Al Viro's avatar
      Revert "fs: fold open_check_o_direct into do_dentry_open" · af04fadc
      Al Viro authored
      This reverts commit cab64df1.
      
      Having vfs_open() in some cases drop the reference to
      struct file combined with
      
      	error = vfs_open(path, f, cred);
      	if (error) {
      		put_filp(f);
      		return ERR_PTR(error);
      	}
      	return f;
      
      is flat-out wrong.  It used to be
      
      		error = vfs_open(path, f, cred);
      		if (!error) {
      			/* from now on we need fput() to dispose of f */
      			error = open_check_o_direct(f);
      			if (error) {
      				fput(f);
      				f = ERR_PTR(error);
      			}
      		} else {
      			put_filp(f);
      			f = ERR_PTR(error);
      		}
      
      and sure, having that open_check_o_direct() boilerplate gotten rid of is
      nice, but not that way...
      
      Worse, another call chain (via finish_open()) is FUBAR now wrt
      FILE_OPENED handling - in that case we get error returned, with file
      already hit by fput() *AND* FILE_OPENED not set.  Guess what happens in
      path_openat(), when it hits
      
      	if (!(opened & FILE_OPENED)) {
      		BUG_ON(!error);
      		put_filp(file);
      	}
      
      The root cause of all that crap is that the callers of do_dentry_open()
      have no way to tell which way did it fail; while that could be fixed up
      (by passing something like int *opened to do_dentry_open() and have it
      marked if we'd called ->open()), it's probably much too late in the
      cycle to do so right now.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      af04fadc
    • Linus Torvalds's avatar
      Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 874cd339
      Linus Torvalds authored
      Pull scheduler fixes from Thomas Gleixner:
      
       - two patches addressing the problem that the scheduler allows under
         certain conditions user space tasks to be scheduled on CPUs which are
         not yet fully booted which causes a few subtle and hard to debug
         issue
      
       - add a missing runqueue clock update in the deadline scheduler which
         triggers a warning under certain circumstances
      
       - fix a silly typo in the scheduler header file
      
      * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/headers: Fix typo
        sched/deadline: Fix missing clock update
        sched/core: Require cpu_active() in select_task_rq(), for user tasks
        sched/core: Fix rules for running on online && !active CPUs
      874cd339
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 26bdace7
      Linus Torvalds authored
      Pull perf tooling fixes from Thomas Gleixner:
      
       - fix 'perf test Session topology' segfault on s390 (Thomas Richter)
      
       - fix NULL return handling in bpf__prepare_load() (YueHaibing)
      
       - fix indexing on Coresight ETM packet queue decoder (Mathieu Poirier)
      
       - fix perf.data format description of NRCPUS header (Arnaldo Carvalho
         de Melo)
      
       - update perf.data documentation section on cpu topology
      
       - handle uncore event aliases in small groups properly (Kan Liang)
      
       - add missing perf_sample.addr into python sample dictionary (Leo Yan)
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf tools: Fix perf.data format description of NRCPUS header
        perf script python: Add addr into perf sample dict
        perf data: Update documentation section on cpu topology
        perf cs-etm: Fix indexing for decoder packet queue
        perf bpf: Fix NULL return handling in bpf__prepare_load()
        perf test: "Session topology" dumps core on s390
        perf parse-events: Handle uncore event aliases in small groups properly
      26bdace7
    • Ming Lei's avatar
      blk-mq: update nr_requests when switching to 'none' scheduler · 32a50fab
      Ming Lei authored
      Now we setup q->nr_requests when switching to one new scheduler,
      but not do it for 'none', then q->nr_requests may not be correct
      for 'none'.
      
      This patch fixes this issue by always updating 'nr_requests' when
      switching to 'none'.
      
      Cc: Marco Patalano <mpatalan@redhat.com>
      Cc: "Ewan D. Milne" <emilne@redhat.com>
      Signed-off-by: default avatarMing Lei <ming.lei@redhat.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      32a50fab
    • Jens Axboe's avatar
      block: don't use blocking queue entered for recursive bio submits · cd4a4ae4
      Jens Axboe authored
      If we end up splitting a bio and the queue goes away between
      the initial submission and the later split submission, then we
      can block forever in blk_queue_enter() waiting for the reference
      to drop to zero. This will never happen, since we already hold
      a reference.
      
      Mark a split bio as already having entered the queue, so we can
      just use the live non-blocking queue enter variant.
      
      Thanks to Tetsuo Handa for the analysis.
      
      Reported-by: syzbot+c4f9cebf9d651f6e54de@syzkaller.appspotmail.com
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      cd4a4ae4
    • Kent Overstreet's avatar
      dm-crypt: fix warning in shutdown path · d00a11df
      Kent Overstreet authored
      The counter for the number of allocated pages includes pages in the
      mempool's reserve, so checking that the number of allocated pages is 0
      needs to happen after we exit the mempool.
      
      Fixes: 6f1c819c ("dm: convert to bioset_init()/mempool_init()")
      Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
      Reported-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
      Acked-by: default avatarMike Snitzer <snitzer@redhat.com>
      
      Fixed to always just use percpu_counter_sum()
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      d00a11df
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 918fe1b3
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Infinite loop in _decode_session6(), from Eric Dumazet.
      
       2) Pass correct argument to nla_strlcpy() in netfilter, also from Eric
          Dumazet.
      
       3) Out of bounds memory access in ipv6 srh code, from Mathieu Xhonneux.
      
       4) NULL deref in XDP_REDIRECT handling of tun driver, from Toshiaki
          Makita.
      
       5) Incorrect idr release in cls_flower, from Paul Blakey.
      
       6) Probe error handling fix in davinci_emac, from Dan Carpenter.
      
       7) Memory leak in XPS configuration, from Alexander Duyck.
      
       8) Use after free with cloned sockets in kcm, from Kirill Tkhai.
      
       9) MTU handling fixes fo ip_tunnel and ip6_tunnel, from Nicolas
          Dichtel.
      
      10) Fix UAPI hole in bpf data structure for 32-bit compat applications,
          from Daniel Borkmann.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (33 commits)
        bpf: fix uapi hole for 32 bit compat applications
        net: usb: cdc_mbim: add flag FLAG_SEND_ZLP
        ip6_tunnel: remove magic mtu value 0xFFF8
        ip_tunnel: restore binding to ifaces with a large mtu
        net: dsa: b53: Add BCM5389 support
        kcm: Fix use-after-free caused by clonned sockets
        net-sysfs: Fix memory leak in XPS configuration
        ixgbe: fix parsing of TC actions for HW offload
        net: ethernet: davinci_emac: fix error handling in probe()
        net/ncsi: Fix array size in dumpit handler
        cls_flower: Fix incorrect idr release when failing to modify rule
        net/sonic: Use dma_mapping_error()
        xfrm Fix potential error pointer dereference in xfrm_bundle_create.
        vhost_net: flush batched heads before trying to busy polling
        tun: Fix NULL pointer dereference in XDP redirect
        be2net: Fix error detection logic for BE3
        net: qmi_wwan: Add Netgear Aircard 779S
        mlxsw: spectrum: Forbid creation of VLAN 1 over port/LAG
        atm: zatm: fix memcmp casting
        iwlwifi: pcie: compare with number of IRQs requested for, not number of CPUs
        ...
      918fe1b3
  3. 02 Jun, 2018 13 commits