1. 17 Mar, 2019 4 commits
    • Douglas Anderson's avatar
      Revert "modsign: Abort modules_install when signing fails" · f84dde10
      Douglas Anderson authored
      This reverts commit caf6fe91.
      
      The commit was fine but is no longer needed as of commit 3a2429e1
      ("kbuild: change if_changed_rule for multi-line recipe").  Let's go
      back to using ";" to be consistent.
      
      For some discussion, see:
      
      https://lkml.kernel.org/r/CAK7LNASde0Q9S5GKeQiWhArfER4S4wL1=R_FW8q0++_X3T5=hQ@mail.gmail.comSigned-off-by: default avatarDouglas Anderson <dianders@chromium.org>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      f84dde10
    • Douglas Anderson's avatar
      kbuild: Make NOSTDINC_FLAGS a simply expanded variable · 0c22be07
      Douglas Anderson authored
      During a simple no-op (nothing changed) build I saw 39 invocations of
      the C compiler with the argument "-print-file-name=include".  We don't
      need to call the C compiler 39 times for this--one time will suffice.
      
      Let's change NOSTDINC_FLAGS to a simply expanded variable to avoid
      this since there doesn't appear to be any reason it should be
      recursively expanded.
      
      On my build this shaved ~400 ms off my "no-op" build.
      
      Note that the recursive expansion seems to date back to the (really
      old) commit e8f5bdb0 ("[PATCH] Makefile include path ordering").
      It's a little unclear to me if the point of that patch was to switch
      the variable to be recursively expanded (which it did) or to avoid
      directly assigning to NOSTDINC_FLAGS (AKA to switch to +=) because
      someone else (out of tree?) was setting it.  I presume later since if
      the only goal was to switch to recursive expansion the patch would
      have just removed the ":".
      Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      0c22be07
    • Arseny Maslennikov's avatar
      kbuild: deb-pkg: avoid implicit effects · f6d9db63
      Arseny Maslennikov authored
      * The man page for dpkg-source(1) notes:
      
      >      -b, --build directory [format-specific-parameters]
      >             Build  a  source  package  (--build since dpkg 1.17.14).
      >             <...>
      >
      >             dpkg-source will build the source package with the first
      >             format found in this ordered list: the format  indicated
      >             with  the  --format  command  line  option,  the  format
      >             indicated in debian/source/format, “1.0”.  The  fallback
      >             to “1.0” is deprecated and will be removed at some point
      >             in the future, you should always  document  the  desired
      >             source   format  in  debian/source/format.  See  section
      >             SOURCE PACKAGE FORMATS for an extensive  description  of
      >             the various source package formats.
      
        Thus it would be more foolproof to explicitly use 1.0 (as we always
        did) than to rely on dpkg-source's defaults.
      
      * In a similar vein, debian/rules is not made executable by mkdebian,
        and dpkg-source warns about that but still silently fixes the file.
        Let's be explicit once again.
      Signed-off-by: default avatarArseny Maslennikov <ar@cs.msu.ru>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      f6d9db63
    • Wen Yang's avatar
      coccinelle: semantic code search for missing put_device() · da9cfb87
      Wen Yang authored
      The of_find_device_by_node() takes a reference to the underlying device
      structure, we should release that reference.
      The implementation of this semantic code search is:
      In a function, for a local variable returned by calling
      of_find_device_by_node(),
      a, if it is released by a function such as
         put_device()/of_dev_put()/platform_device_put() after the last use,
         it is considered that there is no reference leak;
      b, if it is passed back to the caller via
         dev_get_drvdata()/platform_get_drvdata()/get_device(), etc., the
         reference will be released in other functions, and the current function
         also considers that there is no reference leak;
      c, for the rest of the situation, the current function should release the
         reference by calling put_device, this code search will report the
         corresponding error message.
      
      By using this semantic code search, we have found some object reference leaks,
      such as:
      commit 11907e9d ("ASoC: fsl-asoc-card: fix object reference leaks in
      fsl_asoc_card_probe")
      commit a12085d1 ("mtd: rawnand: atmel: fix possible object reference leak")
      commit 11493f26 ("mtd: rawnand: jz4780: fix possible object reference leak")
      
      There are still dozens of reference leaks in the current kernel code.
      
      Further, for the case of b, the object returned to other functions may also
      have a reference leak, we will continue to develop other cocci scripts to
      further check the reference leak.
      Signed-off-by: default avatarWen Yang <wen.yang99@zte.com.cn>
      Reviewed-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
      Reviewed-by: default avatarMarkus Elfring <Markus.Elfring@web.de>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      da9cfb87
  2. 13 Mar, 2019 19 commits
    • Masahiro Yamada's avatar
      kbuild: pkg: grep include/config/auto.conf instead of $KCONFIG_CONFIG · 6fb7ef5a
      Masahiro Yamada authored
      This will be a little more efficient since unset CONFIG options are
      stripped away from auto.conf, and we can hard-code the path to auto.conf
      since it is never overridden.
      
      include/config/kernel.release is generated before %pkg is run.
      So, it is guaranteed auto.conf is up-to-date.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      6fb7ef5a
    • Masahiro Yamada's avatar
      kbuild: deb-pkg: introduce is_enabled and if_enabled_echo to builddeb · 515f4c63
      Masahiro Yamada authored
      I think is_enabled() and if_enable_echo() in scripts/package/mkdebian
      are useful.
      
      builddeb also has many repetitive greps over the kernel config, so I
      borrowed the idea to clean it up.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      515f4c63
    • Masahiro Yamada's avatar
      kbuild: deb-pkg: add CONFIG_ prefix to kernel config options · 7e548e9a
      Masahiro Yamada authored
      This might be a kind of bike-shed, but I personally prefer grep'able
      code.
      
      I often do 'git grep CONFIG_FOO' instead of 'git grep FOO' when I
      want to know where that CONFIG option is used.
      
      This makes code longer, but I hope this is acceptable level.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      7e548e9a
    • Masahiro Yamada's avatar
      kbuild: add workaround for Debian make-kpkg · 2b50f7ab
      Masahiro Yamada authored
      Since commit 3812b8c5 ("kbuild: make -r/-R effective in top
      Makefile for old Make versions"), make-kpkg is not working.
      
      make-kpkg directly includes the top Makefile of Linux kernel, and
      appends some debian_* targets.
      
        /usr/share/kernel-package/ruleset/kernel_version.mk:
      
          # Include the kernel makefile
          override dot-config := 1
          include Makefile
          dot-config := 1
      
      I did not know the kernel Makefile was used in that way, and it is
      hard to guarantee the behavior when the kernel Makefile is included
      by another Makefile from a different project.
      
      It looks like Debian Stretch stopped providing make-kpkg. Maybe it is
      obsolete and being replaced with 'make deb-pkg' etc. but still widely
      used.
      
      This commit adds a workaround; if the top Makefile is included by
      another Makefile, skip sub-make in order to make the main part visible.
      'MAKEFLAGS += -rR' does not become effective for GNU Make < 4.0, but
      Debian/Ubuntu is already using newer versions.
      
      The effect of this commit:
      
        Debian 8 (Jessie)  : Fixed
        Debian 9 (Stretch) : make-kpkg (kernel-package) is not provided
        Ubuntu 14.04 LTS   : NOT Fixed
        Ubuntu 16.04 LTS   : Fixed
        Ubuntu 18.04 LTS   : Fixed
      
      This commit cannot fix Ubuntu 14.04 because it installs GNU Make 3.81,
      but its support will end in Apr 2019, which is before the Linux v5.1
      release.
      
      I added warning so that nobody would try to include the top Makefile.
      
      Fixes: 3812b8c5 ("kbuild: make -r/-R effective in top Makefile for old Make versions")
      Reported-by: default avatarLiz Zhang <lizzha@microsoft.com>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Tested-by: default avatarLili Deng <v-lide@microsoft.com>
      Cc: Manoj Srivastava <srivasta@debian.org>
      2b50f7ab
    • Masahiro Yamada's avatar
      kbuild: source include/config/auto.conf instead of ${KCONFIG_CONFIG} · 94cf8acc
      Masahiro Yamada authored
      As commit 423a8155 ("kbuild: Fix reading of .config in
      link-vmlinux.sh") addressed, some shells fail to perform '.' if
      ${KCONFIG_CONFIG} does not contain a slash at all.
      
      Instead, we can source include/config/auto.conf, which obviously
      contain slashes, and we do not expect its file path overridden by
      a user. Perhaps, the performance might be slightly better since
      unset CONFIG options are stripped from include/config/auto.conf.
      
      scripts/setlocalversion already works this way.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      94cf8acc
    • Masahiro Yamada's avatar
      unicore32: simplify linker script generation for decompressor · c649bd59
      Masahiro Yamada authored
      When I was searching for unneeded $(KCONFIG_CONFIG) usages, I noticed
      this strange build dependency.
      
      It can use $(call if_changed,...) in case ZTEXTADDR and ZBSSADDR are
      changed, but even a simpler way is to use the pattern rule in
      scripts/Makefile.build. This is what arch/arm/boot/compressed/Makefile
      does.
      
      I did only build test. I confirmed equivalent vmlinux.lds was generated.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      c649bd59
    • Masahiro Yamada's avatar
      h8300: use cc-cross-prefix instead of hardcoding h8300-unknown-linux- · fc2b47b5
      Masahiro Yamada authored
      It believe it is a bad idea to hardcode a specific compiler prefix
      that may or may not be installed on a user's system. It is annoying
      when testing features that should not require compilers at all.
      
      For example, mrproper, headers_install, etc. should work without
      any compiler.
      
      They look like follows on my machine.
      
      $ make ARCH=h8300 mrproper
      ./scripts/gcc-version.sh: line 26: h8300-unknown-linux-gcc: command not found
      ./scripts/gcc-version.sh: line 27: h8300-unknown-linux-gcc: command not found
      make: h8300-unknown-linux-gcc: Command not found
      make: h8300-unknown-linux-gcc: Command not found
        [ a bunch of the same error messages continue ]
      
      $ make ARCH=h8300 headers_install
      ./scripts/gcc-version.sh: line 26: h8300-unknown-linux-gcc: command not found
      ./scripts/gcc-version.sh: line 27: h8300-unknown-linux-gcc: command not found
      make: h8300-unknown-linux-gcc: Command not found
        HOSTCC  scripts/basic/fixdep
      make: h8300-unknown-linux-gcc: Command not found
        WRAP    arch/h8300/include/generated/uapi/asm/kvm_para.h
        [ snip ]
      
      The solution is to delete this line, or to use cc-cross-prefix like
      some architectures do. I chose the latter as a moderate fixup.
      
      I added an alternative 'h8300-linux-' because it is available at:
      
      https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/8.1.0/Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      fc2b47b5
    • Masahiro Yamada's avatar
      kbuild: move archive command to scripts/Makefile.lib · 898f5a00
      Masahiro Yamada authored
      scripts/Makefile.build and arch/s390/boot/Makefile use the same
      command (thin archiving with symbol table creation).
      
      Avoid the code duplication, and move it to scripts/Makefile.lib.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      898f5a00
    • Masahiro Yamada's avatar
      modpost: always show verbose warning for section mismatch · 46c7dd56
      Masahiro Yamada authored
      Unless CONFIG_DEBUG_SECTION_MISMATCH is enabled, modpost only shows
      the number of section mismatches.
      
      If you want to know the symbols causing the issue, you need to rebuild
      with CONFIG_DEBUG_SECTION_MISMATCH. It is tedious.
      
      I think it is fine to show annoying warning when a new section mismatch
      comes in.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      46c7dd56
    • Masahiro Yamada's avatar
      ia64: prefix header search path with $(srctree)/ · 393492b5
      Masahiro Yamada authored
      Currently, the Kbuild core manipulates header search paths in a crazy
      way [1].
      
      To fix this mess, I want all Makefiles to add explicit $(srctree)/ to
      the search paths in the srctree. Some Makefiles are already written in
      that way, but not all. The goal of this work is to make the notation
      consistent, and finally get rid of the gross hacks.
      
      Having whitespaces after -I does not matter since commit 48f6e3cf
      ("kbuild: do not drop -I without parameter").
      
      I removed some header search paths because I was able to build ia64
      without them.
      
      [1]: https://patchwork.kernel.org/patch/9632347/Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      393492b5
    • Masahiro Yamada's avatar
      libfdt: prefix header search paths with $(srctree)/ · 13d3bc71
      Masahiro Yamada authored
      Currently, the Kbuild core manipulates header search paths in a crazy
      way [1].
      
      To fix this mess, I want all Makefiles to add explicit $(srctree)/ to
      the search paths in the srctree. Some Makefiles are already written in
      that way, but not all. The goal of this work is to make the notation
      consistent, and finally get rid of the gross hacks.
      
      Having whitespaces after -I does not matter since commit 48f6e3cf
      ("kbuild: do not drop -I without parameter").
      
      [1]: https://patchwork.kernel.org/patch/9632347/Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      13d3bc71
    • Riku Voipio's avatar
      deb-pkg: generate correct build dependencies · e3a22850
      Riku Voipio authored
      bison/flex is now needed always for building for kconfig. Some build
      dependencies depend on kernel configuration, enable them as needed:
      
      - libelf-dev when UNWINDER_ORC is set
      - libssl-dev for SYSTEM_TRUSTED_KEYRING
      
      Since the libssl-dev is needed for extract_cert binary, denote with
      :native to install the libssl-dev for the build machines architecture,
      rather than for the architecture of the kernel being built.
      Tested-by: default avatarManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
      Signed-off-by: default avatarRiku Voipio <riku.voipio@linaro.org>
      Reviewed-by: default avatarBen Hutchings <ben@decadent.org.uk>
      Acked-by: default avatarmaximilian attems <maks@stro.at>
      [masahiro.yamada: change 'flex' to 'flex | flex:native' ]
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      e3a22850
    • Linus Torvalds's avatar
      Merge tag 'kconfig-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild · 5453a3df
      Linus Torvalds authored
      Pull Kconfig updates from Masahiro Yamada:
      
       - rename lexer and parse files
      
       - fix 'Save as' menu of xconfig
      
      * tag 'kconfig-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        kconfig: fix 'Save As' menu of xconfig
        kconfig: rename zconf.y to parser.y
        kconfig: rename zconf.l to lexer.l
      5453a3df
    • Linus Torvalds's avatar
      Merge tag 'pwm/for-5.1-rc1' of... · add8462a
      Linus Torvalds authored
      Merge tag 'pwm/for-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm
      
      Pull pwm updates from Thierry Reding:
       "The changes for this cycle are across the board.
      
        The bulk of it is cleanups, but there's also new device support in
        some drivers as well as more conversions to the atomic API"
      
      * tag 'pwm/for-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (24 commits)
        pwm: atmel: Remove useless symbolic definitions
        pwm: bcm-kona: Update macros to remove braces around numbers
        pwm: imx27: Only enable the clocks once in .get_state()
        pwm: rcar: Improve calculation of divider
        pwm: rcar: Remove legacy APIs
        pwm: rcar: Use "atomic" API on rcar_pwm_resume()
        pwm: rcar: Add support "atomic" API
        pwm: atmel: Add support for SAM9X60's PWM controller
        pwm: atmel: Add PWM binding for SAM9X60
        pwm: atmel: Rename objects of type atmel_pwm_data
        pwm: atmel: Add support for controllers with 32 bit counters
        pwm: atmel: Add struct atmel_pwm_data
        pwm: Add MediaTek MT8183 display PWM driver support
        pwm: hibvt: Add hi3559v100 support
        dt-bindings: pwm: hibvt: Add hi3559v100 support
        pwm: hibvt: Use individual struct per of-data
        pwm: imx: Signedness bug in imx_pwm_get_state()
        pwm: imx: Split into two drivers
        pwm: imx: Don't print an error on -EPROBE_DEFER
        pwm: imx: Set driver data earlier simplifying the end of ->probe()
        ...
      add8462a
    • Linus Torvalds's avatar
      Merge tag 'mailbox-v5.1' of git://git.linaro.org/landing-teams/working/fujitsu/integration · 3a186d38
      Linus Torvalds authored
      Pull mailbox updates from Jassi Brar:
      
       - mailbox-test: support multiple controller instances
      
       - misc cleanup: IMX, STM32 and Tegra
      
       - new driver: ZynqMP IPI
      
      * tag 'mailbox-v5.1' of git://git.linaro.org/landing-teams/working/fujitsu/integration:
        mailbox: imx: keep MU irq working during suspend/resume
        dt-bindings: mailbox: Add Xilinx IPI Mailbox
        mailbox: ZynqMP IPI mailbox controller
        mailbox: stm32-ipcc: remove useless device_init_wakeup call
        mailbox: stm32-ipcc: do not enable wakeup source by default
        mailbox: mailbox-test: fix null pointer if no mmio
        mailbox: mailbox-test: fix debugfs in multi-instances
        mailbox: tegra-hsp: mark suspend function as __maybe_unused
      3a186d38
    • Linus Torvalds's avatar
      Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · dac0bde4
      Linus Torvalds authored
      Pull crypto fixes from Herbert Xu:
       "This fixes a bug in the newly added Exynos5433 AES code as well as an
        old one in the caam driver"
      
      * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        crypto: caam - add missing put_device() call
        crypto: s5p-sss - fix AES support for Exynos5433
      dac0bde4
    • Linus Torvalds's avatar
      Merge tag 'libnvdimm-for-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm · 5ea6718b
      Linus Torvalds authored
      Pull libnvdimm updates from Dan Williams:
       "The bulk of this has been in -next since before the merge window
        opened, with no known collisions / issues reported.
      
        The only detail worth noting, outside the summary below, is that the
        "libnvdimm-start-pad" topic has been truncated to just cleanups and
        small fixes. The full topic branch would have doubled down on hacks
        around the "section alignment" limitation of the core-mm, instead
        effort is now being spent to address that root issue in the memory
        hotplug implementation for v5.2.
      
         - Fix nfit-bus command submission regression
      
         - Support retrieval of short-ARS results if the ARS state is
           "requires continuation", and even if the "no_init_ars" module
           parameter is specified
      
         - Allow busy-polling of the kernel ARS state by allowing root to
           reset the exponential back-off timer
      
         - Filter potentially stale ARS results by tracking query-ARS relative
           to the previous start-ARS
      
         - Enhance dax_device alignment checks
      
         - Add support for the Hyper-V family of device-specific-methods
           (DSMs)
      
         - Add several fixes and workarounds for Hyper-V compatibility
      
         - Fix support to cache the dirty-shutdown-count at init"
      
      * tag 'libnvdimm-for-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: (25 commits)
        libnvdimm/namespace: Clean up holder_class_store()
        libnvdimm/of_pmem: Fix platform_no_drv_owner.cocci warnings
        acpi/nfit: Update NFIT flags error message
        libnvdimm/btt: Fix LBA masking during 'free list' population
        libnvdimm/btt: Remove unnecessary code in btt_freelist_init
        libnvdimm/pfn: Remove dax_label_reserve
        dax: Check the end of the block-device capacity with dax_direct_access()
        nfit/ars: Avoid stale ARS results
        nfit/ars: Allow root to busy-poll the ARS state machine
        nfit/ars: Introduce scrub_flags
        nfit/ars: Remove ars_start_flags
        nfit/ars: Attempt short-ARS even in the no_init_ars case
        nfit/ars: Attempt a short-ARS whenever the ARS state is idle at boot
        acpi/nfit: Require opt-in for read-only label configurations
        libnvdimm/pmem: Honor force_raw for legacy pmem regions
        libnvdimm/pfn: Account for PAGE_SIZE > info-block-size in nd_pfn_init()
        libnvdimm: Fix altmap reservation size calculation
        libnvdimm, pfn: Fix over-trim in trim_pfn_device()
        acpi/nfit: Fix bus command validation
        libnvdimm/dimm: Add a no-BLK quirk based on NVDIMM family
        ...
      5ea6718b
    • Linus Torvalds's avatar
      Merge tag 'fsdax-for-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm · 3bb0f28d
      Linus Torvalds authored
      Pull filesystem-dax updates from Dan Williams:
      
       - Fix handling of PMD-sized entries in the Xarray that lead to a crash
         scenario
      
       - Miscellaneous cleanups and small fixes
      
      * tag 'fsdax-for-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
        dax: Flush partial PMDs correctly
        fs/dax: NIT fix comment regarding start/end vs range
        fs/dax: Convert to use vmf_error()
      3bb0f28d
    • Linus Torvalds's avatar
      Merge tag 'upstream-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs · a840b56b
      Linus Torvalds authored
      Pull UBI and UBIFS updates from Richard Weinberger:
      
       - A new interface for UBI to deal better with read disturb
      
       - Reject unsupported ioctl flags in UBIFS (xfstests found it)
      
      * tag 'upstream-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs:
        ubi: wl: Silence uninitialized variable warning
        ubifs: Reject unsupported ioctl flags explicitly
        ubi: Expose the bitrot interface
        ubi: Introduce in_pq()
      a840b56b
  3. 12 Mar, 2019 17 commits
    • Linus Torvalds's avatar
      Merge tag 'nfsd-5.1' of git://linux-nfs.org/~bfields/linux · ebc551f2
      Linus Torvalds authored
      Pull NFS server updates from Bruce Fields:
       "Miscellaneous NFS server fixes.
      
        Probably the most visible bug is one that could artificially limit
        NFSv4.1 performance by limiting the number of oustanding rpcs from a
        single client.
      
        Neil Brown also gets a special mention for fixing a 14.5-year-old
        memory-corruption bug in the encoding of NFSv3 readdir responses"
      
      * tag 'nfsd-5.1' of git://linux-nfs.org/~bfields/linux:
        nfsd: allow nfsv3 readdir request to be larger.
        nfsd: fix wrong check in write_v4_end_grace()
        nfsd: fix memory corruption caused by readdir
        nfsd: fix performance-limiting session calculation
        svcrpc: fix UDP on servers with lots of threads
        svcrdma: Remove syslog warnings in work completion handlers
        svcrdma: Squelch compiler warning when SUNRPC_DEBUG is disabled
        svcrdma: Use struct_size() in kmalloc()
        svcrpc: fix unlikely races preventing queueing of sockets
        svcrpc: svc_xprt_has_something_to_do seems a little long
        SUNRPC: Don't allow compiler optimisation of svc_xprt_release_slot()
        nfsd: fix an IS_ERR() vs NULL check
      ebc551f2
    • Linus Torvalds's avatar
      Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · a5adcfca
      Linus Torvalds authored
      Pull ext4 updates from Ted Ts'o:
       "A large number of bug fixes and cleanups.
      
        One new feature to allow users to more easily find the jbd2 journal
        thread for a particular ext4 file system"
      
      * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (25 commits)
        jbd2: jbd2_get_transaction does not need to return a value
        jbd2: fix invalid descriptor block checksum
        ext4: fix bigalloc cluster freeing when hole punching under load
        ext4: add sysfs attr /sys/fs/ext4/<disk>/journal_task
        ext4: Change debugging support help prefix from EXT4 to Ext4
        ext4: fix compile error when using BUFFER_TRACE
        jbd2: fix compile warning when using JBUFFER_TRACE
        ext4: fix some error pointer dereferences
        ext4: annotate more implicit fall throughs
        ext4: annotate implicit fall throughs
        ext4: don't update s_rev_level if not required
        jbd2: fold jbd2_superblock_csum_{verify,set} into their callers
        jbd2: fix race when writing superblock
        ext4: fix crash during online resizing
        ext4: disallow files with EXT4_JOURNAL_DATA_FL from EXT4_IOC_SWAP_BOOT
        ext4: add mask of ext4 flags to swap
        ext4: update quota information while swapping boot loader inode
        ext4: cleanup pagecache before swap i_data
        ext4: fix check of inode in swap_inode_boot_loader
        ext4: unlock unused_pages timely when doing writeback
        ...
      a5adcfca
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-5.1-rc1' of git://github.com/ceph/ceph-client · 2b0a80b0
      Linus Torvalds authored
      Pull ceph updates from Ilya Dryomov:
       "The highlights are:
      
         - rbd will now ignore discards that aren't aligned and big enough to
           actually free up some space (myself). This is controlled by the new
           alloc_size map option and can be disabled if needed.
      
         - support for rbd deep-flatten feature (myself). Deep-flatten allows
           "rbd flatten" to fully disconnect the clone image and its snapshots
           from the parent and make the parent snapshot removable.
      
         - a new round of cap handling improvements (Zheng Yan). The kernel
           client should now be much more prompt about releasing its caps and
           it is possible to put a limit on the number of caps held.
      
         - support for getting ceph.dir.pin extended attribute (Zheng Yan)"
      
      * tag 'ceph-for-5.1-rc1' of git://github.com/ceph/ceph-client: (26 commits)
        Documentation: modern versions of ceph are not backed by btrfs
        rbd: advertise support for RBD_FEATURE_DEEP_FLATTEN
        rbd: whole-object write and zeroout should copyup when snapshots exist
        rbd: copyup with an empty snapshot context (aka deep-copyup)
        rbd: introduce rbd_obj_issue_copyup_ops()
        rbd: stop copying num_osd_ops in rbd_obj_issue_copyup()
        rbd: factor out __rbd_osd_req_create()
        rbd: clear ->xferred on error from rbd_obj_issue_copyup()
        rbd: remove experimental designation from kernel layering
        ceph: add mount option to limit caps count
        ceph: periodically trim stale dentries
        ceph: delete stale dentry when last reference is dropped
        ceph: remove dentry_lru file from debugfs
        ceph: touch existing cap when handling reply
        ceph: pass inclusive lend parameter to filemap_write_and_wait_range()
        rbd: round off and ignore discards that are too small
        rbd: handle DISCARD and WRITE_ZEROES separately
        rbd: get rid of obj_req->obj_request_count
        libceph: use struct_size() for kmalloc() in crush_decode()
        ceph: send cap releases more aggressively
        ...
      2b0a80b0
    • Linus Torvalds's avatar
      Merge tag 'for-5.1-part2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · 92825b02
      Linus Torvalds authored
      Pull btrfs fixes from David Sterba:
       "Correctness and a deadlock fixes"
      
      * tag 'for-5.1-part2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: zstd: ensure reclaim timer is properly cleaned up
        btrfs: move ulist allocation out of transaction in quota enable
        btrfs: save drop_progress if we drop refs at all
        btrfs: check for refs on snapshot delete resume
        Btrfs: fix deadlock between clone/dedupe and rename
        Btrfs: fix corruption reading shared and compressed extents after hole punching
      92825b02
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-5.1-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 1fbf3e48
      Linus Torvalds authored
      Pull NFS client updates from Trond Myklebust:
       "Highlights include:
      
        Stable fixes:
         - Fixes for NFS I/O request leakages
         - Fix error handling paths in the NFS I/O recoalescing code
         - Reinitialise NFSv4.1 sequence results before retransmitting a
           request
         - Fix a soft lockup in the delegation recovery code
         - Bulk destroy of layouts needs to be safe w.r.t. umount
         - Prevent thundering herd issues when the SUNRPC socket is not
           connected
         - Respect RPC call timeouts when retrying transmission
      
        Features:
         - Convert rpc auth layer to use xdr_streams
         - Config option to disable insecure RPCSEC_GSS crypto types
         - Reduce size of RPC receive buffers
         - Readdirplus optimization by cache mechanism
         - Convert SUNRPC socket send code to use iov_iter()
         - SUNRPC micro-optimisations to avoid indirect calls
         - Add support for the pNFS LAYOUTERROR operation and use it with the
           pNFS/flexfiles driver
         - Add trace events to report non-zero NFS status codes
         - Various removals of unnecessary dprintks
      
        Bugfixes and cleanups:
         - Fix a number of sparse warnings and documentation format warnings
         - Fix nfs_parse_devname to not modify it's argument
         - Fix potential corruption of page being written through pNFS/blocks
         - fix xfstest generic/099 failures on nfsv3
         - Avoid NFSv4.1 "false retries" when RPC calls are interrupted
         - Abort I/O early if the pNFS/flexfiles layout segment was
           invalidated
         - Avoid unnecessary pNFS/flexfiles layout invalidations"
      
      * tag 'nfs-for-5.1-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (90 commits)
        SUNRPC: Take the transport send lock before binding+connecting
        SUNRPC: Micro-optimise when the task is known not to be sleeping
        SUNRPC: Check whether the task was transmitted before rebind/reconnect
        SUNRPC: Remove redundant calls to RPC_IS_QUEUED()
        SUNRPC: Clean up
        SUNRPC: Respect RPC call timeouts when retrying transmission
        SUNRPC: Fix up RPC back channel transmission
        SUNRPC: Prevent thundering herd when the socket is not connected
        SUNRPC: Allow dynamic allocation of back channel slots
        NFSv4.1: Bump the default callback session slot count to 16
        SUNRPC: Convert remaining GFP_NOIO, and GFP_NOWAIT sites in sunrpc
        NFS/flexfiles: Clean up mirror DS initialisation
        NFS/flexfiles: Remove dead code in ff_layout_mirror_valid()
        NFS/flexfile: Simplify nfs4_ff_layout_select_ds_stateid()
        NFS/flexfile: Simplify nfs4_ff_layout_ds_version()
        NFS/flexfiles: Simplify ff_layout_get_ds_cred()
        NFS/flexfiles: Simplify nfs4_ff_find_or_create_ds_client()
        NFS/flexfiles: Simplify nfs4_ff_layout_select_ds_fh()
        NFS/flexfiles: Speed up read failover when DSes are down
        NFS/flexfiles: Don't invalidate DS deviceids for being unresponsive
        ...
      1fbf3e48
    • Linus Torvalds's avatar
      Merge tag 'ovl-update-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs · f88c5942
      Linus Torvalds authored
      Pull overlayfs updates from Miklos Szeredi:
       "Fix copy up of security related xattrs"
      
      * tag 'ovl-update-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs:
        ovl: Do not lose security.capability xattr over metadata file copy-up
        ovl: During copy up, first copy up data and then xattrs
      f88c5942
    • Linus Torvalds's avatar
      Merge tag 'fuse-update-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse · dfee9c25
      Linus Torvalds authored
      Pull fuse updates from Miklos Szeredi:
       "Scalability and performance improvements, as well as minor bug fixes
        and cleanups"
      
      * tag 'fuse-update-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: (25 commits)
        fuse: cache readdir calls if filesystem opts out of opendir
        fuse: support clients that don't implement 'opendir'
        fuse: lift bad inode checks into callers
        fuse: multiplex cached/direct_io file operations
        fuse add copy_file_range to direct io fops
        fuse: use iov_iter based generic splice helpers
        fuse: Switch to using async direct IO for FOPEN_DIRECT_IO
        fuse: use atomic64_t for khctr
        fuse: clean up aborted
        fuse: Protect ff->reserved_req via corresponding fi->lock
        fuse: Protect fi->nlookup with fi->lock
        fuse: Introduce fi->lock to protect write related fields
        fuse: Convert fc->attr_version into atomic64_t
        fuse: Add fuse_inode argument to fuse_prepare_release()
        fuse: Verify userspace asks to requeue interrupt that we really sent
        fuse: Do some refactoring in fuse_dev_do_write()
        fuse: Wake up req->waitq of only if not background
        fuse: Optimize request_end() by not taking fiq->waitq.lock
        fuse: Kill fasync only if interrupt is queued in queue_interrupt()
        fuse: Remove stale comment in end_requests()
        ...
      dfee9c25
    • Linus Torvalds's avatar
      Merge branch 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 7b47a9e7
      Linus Torvalds authored
      Pull vfs mount infrastructure updates from Al Viro:
       "The rest of core infrastructure; no new syscalls in that pile, but the
        old parts are switched to new infrastructure. At that point
        conversions of individual filesystems can happen independently; some
        are done here (afs, cgroup, procfs, etc.), there's also a large series
        outside of that pile dealing with NFS (quite a bit of option-parsing
        stuff is getting used there - it's one of the most convoluted
        filesystems in terms of mount-related logics), but NFS bits are the
        next cycle fodder.
      
        It got seriously simplified since the last cycle; documentation is
        probably the weakest bit at the moment - I considered dropping the
        commit introducing Documentation/filesystems/mount_api.txt (cutting
        the size increase by quarter ;-), but decided that it would be better
        to fix it up after -rc1 instead.
      
        That pile allows to do followup work in independent branches, which
        should make life much easier for the next cycle. fs/super.c size
        increase is unpleasant; there's a followup series that allows to
        shrink it considerably, but I decided to leave that until the next
        cycle"
      
      * 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (41 commits)
        afs: Use fs_context to pass parameters over automount
        afs: Add fs_context support
        vfs: Add some logging to the core users of the fs_context log
        vfs: Implement logging through fs_context
        vfs: Provide documentation for new mount API
        vfs: Remove kern_mount_data()
        hugetlbfs: Convert to fs_context
        cpuset: Use fs_context
        kernfs, sysfs, cgroup, intel_rdt: Support fs_context
        cgroup: store a reference to cgroup_ns into cgroup_fs_context
        cgroup1_get_tree(): separate "get cgroup_root to use" into a separate helper
        cgroup_do_mount(): massage calling conventions
        cgroup: stash cgroup_root reference into cgroup_fs_context
        cgroup2: switch to option-by-option parsing
        cgroup1: switch to option-by-option parsing
        cgroup: take options parsing into ->parse_monolithic()
        cgroup: fold cgroup1_mount() into cgroup1_get_tree()
        cgroup: start switching to fs_context
        ipc: Convert mqueue fs to fs_context
        proc: Add fs_context support to procfs
        ...
      7b47a9e7
    • Linus Torvalds's avatar
      Merge branch 'work.iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · dbc2fba3
      Linus Torvalds authored
      Pull iov_iter updates from Al Viro:
       "A couple of iov_iter patches - Christoph's crapectomy (the last
        remaining user of iov_for_each() went away with lustre, IIRC) and
        Eric'c optimization of sanity checks"
      
      * 'work.iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        iov_iter: optimize page_copy_sane()
        uio: remove the unused iov_for_each macro
      dbc2fba3
    • Linus Torvalds's avatar
      Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 5f739e4a
      Linus Torvalds authored
      Pull misc vfs updates from Al Viro:
       "Assorted fixes (really no common topic here)"
      
      * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        vfs: Make __vfs_write() static
        vfs: fix preadv64v2 and pwritev64v2 compat syscalls with offset == -1
        pipe: stop using ->can_merge
        splice: don't merge into linked buffers
        fs: move generic stat response attr handling to vfs_getattr_nosec
        orangefs: don't reinitialize result_mask in ->getattr
        fs/devpts: always delete dcache dentry-s in dput()
      5f739e4a
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · a667cb7a
      Linus Torvalds authored
      Merge misc updates from Andrew Morton:
      
       - a few misc things
      
       - the rest of MM
      
      -  remove flex_arrays, replace with new simple radix-tree implementation
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (38 commits)
        Drop flex_arrays
        sctp: convert to genradix
        proc: commit to genradix
        generic radix trees
        selinux: convert to kvmalloc
        md: convert to kvmalloc
        openvswitch: convert to kvmalloc
        of: fix kmemleak crash caused by imbalance in early memory reservation
        mm: memblock: update comments and kernel-doc
        memblock: split checks whether a region should be skipped to a helper function
        memblock: remove memblock_{set,clear}_region_flags
        memblock: drop memblock_alloc_*_nopanic() variants
        memblock: memblock_alloc_try_nid: don't panic
        treewide: add checks for the return value of memblock_alloc*()
        swiotlb: add checks for the return value of memblock_alloc*()
        init/main: add checks for the return value of memblock_alloc*()
        mm/percpu: add checks for the return value of memblock_alloc*()
        sparc: add checks for the return value of memblock_alloc*()
        ia64: add checks for the return value of memblock_alloc*()
        arch: don't memset(0) memory returned by memblock_alloc()
        ...
      a667cb7a
    • Kent Overstreet's avatar
      Drop flex_arrays · 586187d7
      Kent Overstreet authored
      All existing users have been converted to generic radix trees
      
      Link: http://lkml.kernel.org/r/20181217131929.11727-8-kent.overstreet@gmail.comSigned-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
      Acked-by: default avatarDave Hansen <dave.hansen@intel.com>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Eric Paris <eparis@parisplace.org>
      Cc: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Neil Horman <nhorman@tuxdriver.com>
      Cc: Paul Moore <paul@paul-moore.com>
      Cc: Pravin B Shelar <pshelar@ovn.org>
      Cc: Shaohua Li <shli@kernel.org>
      Cc: Stephen Smalley <sds@tycho.nsa.gov>
      Cc: Vlad Yasevich <vyasevich@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      586187d7
    • Kent Overstreet's avatar
      sctp: convert to genradix · 2075e50c
      Kent Overstreet authored
      This also makes sctp_stream_alloc_(out|in) saner, in that they no longer
      allocate new flex_arrays/genradixes, they just preallocate more
      elements.
      
      This code does however have a suspicious lack of locking.
      
      Link: http://lkml.kernel.org/r/20181217131929.11727-7-kent.overstreet@gmail.comSigned-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
      Cc: Vlad Yasevich <vyasevich@gmail.com>
      Cc: Neil Horman <nhorman@tuxdriver.com>
      Cc: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Dave Hansen <dave.hansen@intel.com>
      Cc: Eric Paris <eparis@parisplace.org>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Paul Moore <paul@paul-moore.com>
      Cc: Pravin B Shelar <pshelar@ovn.org>
      Cc: Shaohua Li <shli@kernel.org>
      Cc: Stephen Smalley <sds@tycho.nsa.gov>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2075e50c
    • Kent Overstreet's avatar
      proc: commit to genradix · 94f8f3b0
      Kent Overstreet authored
      The new generic radix trees have a simpler API and implementation, and
      no limitations on number of elements, so all flex_array users are being
      converted
      
      Link: http://lkml.kernel.org/r/20181217131929.11727-6-kent.overstreet@gmail.comSigned-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
      Reviewed-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Dave Hansen <dave.hansen@intel.com>
      Cc: Eric Paris <eparis@parisplace.org>
      Cc: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Neil Horman <nhorman@tuxdriver.com>
      Cc: Paul Moore <paul@paul-moore.com>
      Cc: Pravin B Shelar <pshelar@ovn.org>
      Cc: Shaohua Li <shli@kernel.org>
      Cc: Stephen Smalley <sds@tycho.nsa.gov>
      Cc: Vlad Yasevich <vyasevich@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      94f8f3b0
    • Kent Overstreet's avatar
      generic radix trees · ba20ba2e
      Kent Overstreet authored
      Very simple radix tree implementation that supports storing arbitrary
      size entries, up to PAGE_SIZE - upcoming patches will convert existing
      flex_array users to genradixes.  The new genradix code has a much
      simpler API and implementation, and doesn't have a hard limit on the
      number of elements like flex_array does.
      
      Link: http://lkml.kernel.org/r/20181217131929.11727-5-kent.overstreet@gmail.comSigned-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Dave Hansen <dave.hansen@intel.com>
      Cc: Eric Paris <eparis@parisplace.org>
      Cc: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Neil Horman <nhorman@tuxdriver.com>
      Cc: Paul Moore <paul@paul-moore.com>
      Cc: Pravin B Shelar <pshelar@ovn.org>
      Cc: Shaohua Li <shli@kernel.org>
      Cc: Stephen Smalley <sds@tycho.nsa.gov>
      Cc: Vlad Yasevich <vyasevich@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ba20ba2e
    • Kent Overstreet's avatar
      selinux: convert to kvmalloc · acdf52d9
      Kent Overstreet authored
      The flex arrays were being used for constant sized arrays, so there's no
      benefit to using flex_arrays over something simpler.
      
      Link: http://lkml.kernel.org/r/20181217131929.11727-4-kent.overstreet@gmail.comSigned-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
      Cc: Paul Moore <paul@paul-moore.com>
      Cc: Stephen Smalley <sds@tycho.nsa.gov>
      Cc: Eric Paris <eparis@parisplace.org>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Dave Hansen <dave.hansen@intel.com>
      Cc: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Neil Horman <nhorman@tuxdriver.com>
      Cc: Pravin B Shelar <pshelar@ovn.org>
      Cc: Shaohua Li <shli@kernel.org>
      Cc: Vlad Yasevich <vyasevich@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      acdf52d9
    • Kent Overstreet's avatar
      md: convert to kvmalloc · b330e6a4
      Kent Overstreet authored
      The code really just wants a big flat buffer, so just do that.
      
      Link: http://lkml.kernel.org/r/20181217131929.11727-3-kent.overstreet@gmail.comSigned-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
      Reviewed-by: default avatarMatthew Wilcox <willy@infradead.org>
      Cc: Shaohua Li <shli@kernel.org>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Dave Hansen <dave.hansen@intel.com>
      Cc: Eric Paris <eparis@parisplace.org>
      Cc: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Cc: Neil Horman <nhorman@tuxdriver.com>
      Cc: Paul Moore <paul@paul-moore.com>
      Cc: Pravin B Shelar <pshelar@ovn.org>
      Cc: Stephen Smalley <sds@tycho.nsa.gov>
      Cc: Vlad Yasevich <vyasevich@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b330e6a4