1. 01 Dec, 2018 20 commits
    • Masahiro Yamada's avatar
      kbuild: refactor if_changed · 67126965
      Masahiro Yamada authored
      '@set -e; $(echo-cmd) $(cmd_$(1)' can be replaced with '$(cmd)'.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      67126965
    • Masahiro Yamada's avatar
      kbuild: remove trailing semicolon from cmd_* passed to if_changed_rule · e5d28910
      Masahiro Yamada authored
      With the change of rule_cc_o_c / rule_as_o_S in the last commit, each
      command is executed in a separate subshell. Rip off unneeded semicolons.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      e5d28910
    • Masahiro Yamada's avatar
      kbuild: change if_changed_rule for multi-line recipe · 3a2429e1
      Masahiro Yamada authored
      The 'define' ... 'endef' directive is useful to confine a series of
      shell commands into a single macro:
      
        define foo
                [action1]
                [action2]
                [action3]
        endif
      
      Each action is executed in a separate subshell.
      
      However, rule_cc_o_c and rule_as_o_S in scripts/Makefile.build are
      written as follows (with a trailing semicolon in each cmd_*):
      
        define rule_cc_o_c
                [action1] ; \
                [action2] ; \
                [action3] ;
        endef
      
      All shell commands are concatenated with '; \' so that it looks like
      a single command from the Makefile point of view. This does not
      exploit the benefits of 'define' ... 'endef' form because a single
      shell command can be more simply written, like this:
      
        rule_cc_o_c = \
                [action1] ; \
                [action2] ; \
                [action3] ;
      
      I guess the intention for the command concatenation was to let the
      '@set -e' in if_changed_rule cover all the commands.
      
      We can improve the readability by moving '@set -e' to the 'cmd' macro.
      The combo of $(call echo-cmd,*) $(cmd_*) in rule_cc_o_c and rule_as_o_S
      have been replaced with $(call cmd,*). The trailing back-slashes have
      been removed.
      
      Here is a note about the performance: the commands in rule_cc_o_c and
      rule_as_o_S were previously executed all together in a single subshell,
      but now each line in a separate subshell. This means Make will spawn
      extra subshells [1]. I measured the build performance for
        x86_64_defconfig + CONFIG_MODVERSIONS + CONFIG_TRIM_UNUSED_KSYMS
      and I saw slight performance regression, but I believe code readability
      and maintainability wins.
      
      [1] Precisely, GNU Make may optimize this by executing the command
          directly instead of forking a subshell, if no shell special
          characters are found in the command line and omitting the subshell
          will not change the behavior.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      3a2429e1
    • Masahiro Yamada's avatar
      kbuild: simplify dependency generation for CONFIG_TRIM_UNUSED_KSYMS · bbda5ec6
      Masahiro Yamada authored
      My main motivation of this commit is to clean up scripts/Kbuild.include
      and scripts/Makefile.build.
      
      Currently, CONFIG_TRIM_UNUSED_KSYMS works with a tricky gimmick;
      possibly exported symbols are detected by letting $(CPP) replace
      EXPORT_SYMBOL* with a special string '=== __KSYM_*===', which is
      post-processed by sed, and passed to fixdep. The extra preprocessing
      is costly, and hacking cmd_and_fixdep is ugly.
      
      I came up with a new way to find exported symbols; insert a dummy
      symbol __ksym_marker_* to each potentially exported symbol. Those
      dummy symbols are picked up by $(NM), post-processed by sed, then
      appended to .*.cmd files. I collected the post-process part to a
      new shell script scripts/gen_ksymdeps.sh for readability. The dummy
      symbols are put into the .discard.* section so that the linker
      script rips them off the final vmlinux or modules.
      
      A nice side-effect is building with CONFIG_TRIM_UNUSED_KSYMS will
      be much faster.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Reviewed-by: default avatarNicolas Pitre <nico@linaro.org>
      bbda5ec6
    • Masahiro Yamada's avatar
      kbuild: refactor modversions build rules · ee3e46b7
      Masahiro Yamada authored
      Let $(CC) compile objects into normal files *.o instead of .tmp_*.o
      whether CONFIG_MODVERSIONS is enabled or not. With this, the input
      file for objtool is always *.o so objtool_o can go away.
      
      I guess the reason of using .tmp_*.o for intermediate objects was
      to avoid leaving incomplete *.o file (, whose timestamp says it is
      up-to-date) when the genksyms tool failed for some reasons.
      
      It no longer matters because any targets are deleted on errors since
      commit 9c2af1c7 ("kbuild: add .DELETE_ON_ERROR special target").
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      ee3e46b7
    • Masahiro Yamada's avatar
      kbuild: remove redundant 'set -e' from sub_cmd_record_mcount · 4317ee3b
      Masahiro Yamada authored
      This is executed inside the if_changed_rule, which already sets
      'set -e'.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      4317ee3b
    • Masahiro Yamada's avatar
      kbuild: remove redundant 'set -e' from filechk_offsets · f3fd4a3f
      Masahiro Yamada authored
      The filechk macro in scripts/Kbuild.include already sets 'set -e'.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      f3fd4a3f
    • Masahiro Yamada's avatar
      kbuild: let fixdep directly write to .*.cmd files · 392885ee
      Masahiro Yamada authored
      Currently, fixdep writes dependencies to .*.tmp, which is renamed to
      .*.cmd after everything succeeds. This is a very safe way to avoid
      corrupted .*.cmd files. The if_changed_dep has carried this safety
      mechanism since it was added in 2002.
      
      If fixdep fails for some reasons or a user terminates the build while
      fixdep is running, the incomplete output from the fixdep could be
      troublesome.
      
      This is my insight about some bad scenarios:
      
      [1] If the compiler succeeds to generate *.o file, but fixdep fails
          to write necessary dependencies to .*.cmd file, Make will miss
          to rebuild the object when headers or CONFIG options are changed.
          In this case, fixdep should not generate .*.cmd file at all so
          that 'arg-check' will surely trigger the rebuild of the object.
      
      [2] A partially constructed .*.cmd file may not be a syntactically
          correct makefile. The next time Make runs, it would include it,
          then fail to parse it. Once this happens, 'make clean' is be the
          only way to fix it.
      
      In fact, [1] is no longer a problem since commit 9c2af1c7 ("kbuild:
      add .DELETE_ON_ERROR special target"). Make deletes a target file on
      any failure in its recipe. Because fixdep is a part of the recipe of
      *.o target, if it fails, the *.o is deleted anyway. However, I am a
      bit worried about the slight possibility of [2].
      
      So, here is a solution. Let fixdep directly write to a .*.cmd file,
      but allow makefiles to include it only when its corresponding target
      exists.
      
      This effectively reverts commit 2982c953 ("kbuild: remove redundant
      $(wildcard ...) for cmd_files calculation"), and commit 00d78ab2
      ("kbuild: remove dead code in cmd_files calculation in top Makefile")
      because now we must check the presence of targets.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      392885ee
    • Masahiro Yamada's avatar
      kbuild: descend into scripts/gcc-plugins/ via scripts/Makefile · ce2fd53a
      Masahiro Yamada authored
      Now that 'archprepare' depends on 'scripts', Kbuild can descend into
      scripts/gcc-plugins in a more standard way.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Reviewed-by: default avatarKees Cook <keescook@chromium.org>
      ce2fd53a
    • Masahiro Yamada's avatar
      kbuild: make 'archprepare' depend on 'scripts' · 059bc9fc
      Masahiro Yamada authored
      Before start descending, Kbuild needs to run 'prepare' and 'scripts',
      which has been orthogonal to each other.
      
      Going forward, let's consider 'scripts' is a part of the preparation.
      This will allow more cleanups.
      
      Move 'scripts' to the prerequisite of 'archprepare', where UML starts
      compiling target *.c files.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      059bc9fc
    • Masahiro Yamada's avatar
      kbuild: move modpost out of 'scripts' target · 60df1aee
      Masahiro Yamada authored
      I am eagar to build under the scripts/ directory only with $(HOSTCC),
      but scripts/mod/ highly depends on the $(CC) and target arch headers.
      That it why the 'scripts' target must depend on 'asm-generic',
      'gcc-plugins', and $(autoksyms_h).
      
      Move it to the 'prepare0' stage. I know this is a cheesy workaround,
      but better than the current situation.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      60df1aee
    • Masahiro Yamada's avatar
      kbuild: fix UML build error with CONFIG_GCC_PLUGINS · 65bba042
      Masahiro Yamada authored
      UML fails to build with CONFIG_GCC_PLUGINS=y.
      
      $ make -s ARCH=um mrproper
      $ make -s ARCH=um allmodconfig
      $ make ARCH=um
        UPD     include/generated/uapi/linux/version.h
        WRAP    arch/x86/include/generated/uapi/asm/bpf_perf_event.h
        WRAP    arch/x86/include/generated/uapi/asm/poll.h
        WRAP    arch/x86/include/generated/asm/dma-contiguous.h
        WRAP    arch/x86/include/generated/asm/early_ioremap.h
        WRAP    arch/x86/include/generated/asm/export.h
        WRAP    arch/x86/include/generated/asm/mcs_spinlock.h
        WRAP    arch/x86/include/generated/asm/mm-arch-hooks.h
        SYSTBL  arch/x86/include/generated/asm/syscalls_32.h
        SYSHDR  arch/x86/include/generated/asm/unistd_32_ia32.h
        SYSHDR  arch/x86/include/generated/asm/unistd_64_x32.h
        SYSTBL  arch/x86/include/generated/asm/syscalls_64.h
        SYSHDR  arch/x86/include/generated/uapi/asm/unistd_32.h
        SYSHDR  arch/x86/include/generated/uapi/asm/unistd_64.h
        SYSHDR  arch/x86/include/generated/uapi/asm/unistd_x32.h
        HOSTCC  scripts/unifdef
        CC      arch/x86/um/user-offsets.s
      cc1: error: cannot load plugin ./scripts/gcc-plugins/cyc_complexity_plugin.so
      ./scripts/gcc-plugins/cyc_complexity_plugin.so: cannot open shared object file: No such file or directory
      cc1: error: cannot load plugin ./scripts/gcc-plugins/structleak_plugin.so
      ./scripts/gcc-plugins/structleak_plugin.so: cannot open shared object file: No such file or directory
      cc1: error: cannot load plugin ./scripts/gcc-plugins/latent_entropy_plugin.so
      ./scripts/gcc-plugins/latent_entropy_plugin.so: cannot open shared object file: No such file or directory
      cc1: error: cannot load plugin ./scripts/gcc-plugins/randomize_layout_plugin.so
      ./scripts/gcc-plugins/randomize_layout_plugin.so: cannot open shared object file: No such file or directory
      make[1]: *** [scripts/Makefile.build;119: arch/x86/um/user-offsets.s] Error 1
      make: *** [arch/um/Makefile;152: arch/x86/um/user-offsets.s] Error 2
      
      Reorder the preparation stage (with cleanups) to make sure gcc-plugins
      is built before descending to arch/x86/um/.
      
      Fixes: 6b90bd4b ("GCC plugin infrastructure")
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      65bba042
    • Masahiro Yamada's avatar
      modpost: move unresolved symbol checks to check_exports() · 3b415288
      Masahiro Yamada authored
      This will fit better in check_exports() than add_versions().
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      3b415288
    • Masahiro Yamada's avatar
      modpost: merge module iterations · c6826ad8
      Masahiro Yamada authored
      Probably, this is just a matter of the order of error/warning
      messages. Merge the two for-loops.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      c6826ad8
    • Masahiro Yamada's avatar
      modpost: refactor seen flag clearing in add_depends() · d2665ca8
      Masahiro Yamada authored
      You do not need to iterate over all modules for resetting ->seen flag
      because add_depends() is only interested in modules that export symbols
      referenced from the given 'mod'.
      
      This also avoids shadowing the 'modules' parameter of add_depends().
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      d2665ca8
    • Masahiro Yamada's avatar
      modpost: file2alias: check prototype of handler · f880eea6
      Masahiro Yamada authored
      Use specific prototype instead of an opaque pointer so that the
      compiler can catch function prototype mismatch.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Reviewed-by: default avatarMathieu Malaterre <malat@debian.org>
      f880eea6
    • Masahiro Yamada's avatar
      modpost: file2alias: go back to simple devtable lookup · ec91e78d
      Masahiro Yamada authored
      Commit e49ce141 ("modpost: use linker section to generate table.")
      was not so cool as we had expected first; it ended up with ugly section
      hacks when commit dd2a3aca ("mod/file2alias: make modpost compile
      on darwin again") came in.
      
      Given a certain degree of unknowledge about the link stage of host
      programs, I really want to see simple, stupid table lookup so that
      this works in the same way regardless of the underlying executable
      format.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Acked-by: default avatarMathieu Malaterre <malat@debian.org>
      ec91e78d
    • Masahiro Yamada's avatar
      kbuild: fix single target build for external module · e07db28e
      Masahiro Yamada authored
      Building a single target in an external module fails due to missing
      .tmp_versions directory.
      
      For example,
      
        $ make -C /lib/modules/$(uname -r)/build M=$PWD foo.o
      
      will fail in the following way:
      
        CC [M]  /home/masahiro/foo/foo.o
      /bin/sh: 1: cannot create /home/masahiro/foo/.tmp_versions/foo.mod: Directory nonexistent
      
      This is because $(cmd_crmodverdir) is executed only before building
      /, %/, %.ko single targets of external modules. Create .tmp_versions
      in the 'prepare' target.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      e07db28e
    • Paul Walmsley's avatar
      modpost: skip ELF local symbols during section mismatch check · a4d26f1a
      Paul Walmsley authored
      During development of a serial console driver with a gcc 8.2.0
      toolchain for RISC-V, the following modpost warning appeared:
      
      ----
      WARNING: vmlinux.o(.data+0x19b10): Section mismatch in reference from the variable .LANCHOR1 to the function .init.text:sifive_serial_console_setup()
      The variable .LANCHOR1 references
      the function __init sifive_serial_console_setup()
      If the reference is valid then annotate the
      variable with __init* or __refdata (see linux/init.h) or name the variable:
      *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
      ----
      
      ".LANCHOR1" is an ELF local symbol, automatically created by gcc's section
      anchor generation code:
      
      https://gcc.gnu.org/onlinedocs/gccint/Anchored-Addresses.html
      
      https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/varasm.c;h=cd9591a45617464946dcf9a126dde277d9de9804;hb=9fb89fa845c1b2e0a18d85ada0b077c84508ab78#l7473
      
      This was verified by compiling the kernel with -fno-section-anchors
      and observing that the ".LANCHOR1" ELF local symbol disappeared, and
      modpost no longer warned about the section mismatch.  The serial
      driver code idiom triggering the warning is standard Linux serial
      driver practice that has a specific whitelist inclusion in modpost.c.
      
      I'm neither a modpost nor an ELF expert, but naively, it doesn't seem
      useful for modpost to report section mismatch warnings caused by ELF
      local symbols by default.  Local symbols have compiler-generated
      names, and thus bypass modpost's whitelisting algorithm, which relies
      on the presence of a non-autogenerated symbol name.  This increases
      the likelihood that false positive warnings will be generated (as in
      the above case).
      
      Thus, disable section mismatch reporting on ELF local symbols.  The
      rationale here is similar to that of commit 2e3a10a1 ("ARM: avoid
      ARM binutils leaking ELF local symbols") and of similar code already
      present in modpost.c:
      
      https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/mod/modpost.c?h=v4.19-rc4&id=7876320f88802b22d4e2daf7eb027dd14175a0f8#n1256
      
      This third version of the patch implements a suggestion from Masahiro
      Yamada <yamada.masahiro@socionext.com> to restructure the code as an
      additional pattern matching step inside secref_whitelist(), and
      further improves the patch description.
      Signed-off-by: default avatarPaul Walmsley <paul.walmsley@sifive.com>
      Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
      Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      a4d26f1a
    • Masahiro Yamada's avatar
      kbuild: announce removal of SUBDIRS if used · 0126be38
      Masahiro Yamada authored
      SUBDIRS has been kept as a backward compatibility since
      commit ("[PATCH] kbuild: external module support") in 2002.
      
      We do not need multiple ways to do the same thing, so I will remove
      SUBDIRS after the Linux 5.3 release. I cleaned up in-tree code, and
      updated the document so that nobody would try to use it.
      
      Meanwhile, display the following warning if SUBDIRS is used.
      
      Makefile:189: ================= WARNING ================
      Makefile:190: 'SUBDIRS' will be removed after Linux 5.3
      Makefile:191: Please use 'M=' or 'KBUILD_EXTMOD' instead
      Makefile:192: ==========================================
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Acked-by: Boris Brezillon <boris.brezillon@bootlin.com> # for scx200_docflash.c
      Acked-by: Guenter Roeck <linux@roeck-us.net> # for scx200_wdt.c
      0126be38
  2. 21 Nov, 2018 3 commits
  3. 13 Nov, 2018 4 commits
  4. 11 Nov, 2018 13 commits
    • Linus Torvalds's avatar
      Linux 4.20-rc2 · ccda4af0
      Linus Torvalds authored
      ccda4af0
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 7a3765ed
      Linus Torvalds authored
      Pull networking fixes from David Miller:
       "One last pull request before heading to Vancouver for LPC, here we have:
      
         1) Don't forget to free VSI contexts during ice driver unload, from
            Victor Raj.
      
         2) Don't forget napi delete calls during device remove in ice driver,
            from Dave Ertman.
      
         3) Don't request VLAN tag insertion of ibmvnic device when SKB
            doesn't have VLAN tags at all.
      
         4) IPV4 frag handling code has to accomodate the situation where two
            threads try to insert the same fragment into the hash table at the
            same time. From Eric Dumazet.
      
         5) Relatedly, don't flow separate on protocol ports for fragmented
            frames, also from Eric Dumazet.
      
         6) Memory leaks in qed driver, from Denis Bolotin.
      
         7) Correct valid MTU range in smsc95xx driver, from Stefan Wahren.
      
         8) Validate cls_flower nested policies properly, from Jakub Kicinski.
      
         9) Clearing of stats counters in mc88e6xxx driver doesn't retain
            important bits in the G1_STATS_OP register causing the chip to
            hang. Fix from Andrew Lunn"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (41 commits)
        act_mirred: clear skb->tstamp on redirect
        net: dsa: mv88e6xxx: Fix clearing of stats counters
        tipc: fix link re-establish failure
        net: sched: cls_flower: validate nested enc_opts_policy to avoid warning
        net: mvneta: correct typo
        flow_dissector: do not dissect l4 ports for fragments
        net: qualcomm: rmnet: Fix incorrect assignment of real_dev
        net: aquantia: allow rx checksum offload configuration
        net: aquantia: invalid checksumm offload implementation
        net: aquantia: fixed enable unicast on 32 macvlan
        net: aquantia: fix potential IOMMU fault after driver unbind
        net: aquantia: synchronized flow control between mac/phy
        net: smsc95xx: Fix MTU range
        net: stmmac: Fix RX packet size > 8191
        qed: Fix potential memory corruption
        qed: Fix SPQ entries not returned to pool in error flows
        qed: Fix blocking/unlimited SPQ entries leak
        qed: Fix memory/entry leak in qed_init_sp_request()
        inet: frags: better deal with smp races
        net: hns3: bugfix for not checking return value
        ...
      7a3765ed
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v4.20' of... · e12e00e3
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
      
       - fix build errors in binrpm-pkg and bindeb-pkg targets
      
       - fix false positive matches in merge_config.sh
      
       - fix build version mismatch in deb-pkg target
      
       - fix dtbs_install handling in (bin)deb-pkg target
      
       - revert a commit that allows setlocalversion to write to source tree
      
      * tag 'kbuild-fixes-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        builddeb: Fix inclusion of dtbs in debian package
        Revert "scripts/setlocalversion: git: Make -dirty check more robust"
        kbuild: deb-pkg: fix too low build version number
        kconfig: merge_config: avoid false positive matches from comment lines
        kbuild: deb-pkg: fix bindeb-pkg breakage when O= is used
        kbuild: rpm-pkg: fix binrpm-pkg breakage when O= is used
      e12e00e3
    • Linus Torvalds's avatar
      Merge tag 'for-4.20-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · 63a42e1a
      Linus Torvalds authored
      Pull btrfs fixes from David Sterba:
       "Several fixes to recent release (4.19, fixes tagged for stable) and
        other fixes"
      
      * tag 'for-4.20-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        Btrfs: fix missing delayed iputs on unmount
        Btrfs: fix data corruption due to cloning of eof block
        Btrfs: fix infinite loop on inode eviction after deduplication of eof block
        Btrfs: fix deadlock on tree root leaf when finding free extent
        btrfs: avoid link error with CONFIG_NO_AUTO_INLINE
        btrfs: tree-checker: Fix misleading group system information
        Btrfs: fix missing data checksums after a ranged fsync (msync)
        btrfs: fix pinned underflow after transaction aborted
        Btrfs: fix cur_offset in the error case for nocow
      63a42e1a
    • Linus Torvalds's avatar
      Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · c140f8b0
      Linus Torvalds authored
      Pull ext4 fixes from Ted Ts'o:
       "A large number of ext4 bug fixes, mostly buffer and memory leaks on
        error return cleanup paths"
      
      * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
        ext4: missing !bh check in ext4_xattr_inode_write()
        ext4: fix buffer leak in __ext4_read_dirblock() on error path
        ext4: fix buffer leak in ext4_expand_extra_isize_ea() on error path
        ext4: fix buffer leak in ext4_xattr_move_to_block() on error path
        ext4: release bs.bh before re-using in ext4_xattr_block_find()
        ext4: fix buffer leak in ext4_xattr_get_block() on error path
        ext4: fix possible leak of s_journal_flag_rwsem in error path
        ext4: fix possible leak of sbi->s_group_desc_leak in error path
        ext4: remove unneeded brelse call in ext4_xattr_inode_update_ref()
        ext4: avoid possible double brelse() in add_new_gdb() on error path
        ext4: avoid buffer leak in ext4_orphan_add() after prior errors
        ext4: avoid buffer leak on shutdown in ext4_mark_iloc_dirty()
        ext4: fix possible inode leak in the retry loop of ext4_resize_fs()
        ext4: fix missing cleanup if ext4_alloc_flex_bg_array() fails while resizing
        ext4: add missing brelse() update_backups()'s error path
        ext4: add missing brelse() add_new_gdb_meta_bg()'s error path
        ext4: add missing brelse() in set_flexbg_block_bitmap()'s error path
        ext4: avoid potential extra brelse in setup_new_flex_group_blocks()
      c140f8b0
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · b6df7b6d
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
       "A set of x86 fixes:
      
         - Cure the LDT remapping to user space on 5 level paging which ended
           up in the KASLR space
      
         - Remove LDT mapping before freeing the LDT pages
      
         - Make NFIT MCE handling more robust
      
         - Unbreak the VSMP build by removing the dependency on paravirt ops
      
         - Support broken PIT emulation on Microsoft hyperV
      
         - Don't trace vmware_sched_clock() to avoid tracer recursion
      
         - Remove -pipe from KBUILD CFLAGS which breaks clang and is also
           slower on GCC
      
         - Trivial coding style and typo fixes"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/cpu/vmware: Do not trace vmware_sched_clock()
        x86/vsmp: Remove dependency on pv_irq_ops
        x86/ldt: Remove unused variable in map_ldt_struct()
        x86/ldt: Unmap PTEs for the slot before freeing LDT pages
        x86/mm: Move LDT remap out of KASLR region on 5-level paging
        acpi/nfit, x86/mce: Validate a MCE's address before using it
        acpi/nfit, x86/mce: Handle only uncorrectable machine checks
        x86/build: Remove -pipe from KBUILD_CFLAGS
        x86/hyper-v: Fix indentation in hv_do_fast_hypercall16()
        Documentation/x86: Fix typo in zero-page.txt
        x86/hyper-v: Enable PIT shutdown quirk
        clockevents/drivers/i8253: Add support for PIT shutdown quirk
      b6df7b6d
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 655c6b97
      Linus Torvalds authored
      Pull perf fixes from Thomas Gleixner:
       "A bunch of perf tooling fixes:
      
         - Make the Intel PT SQL viewer more robust
      
         - Make the Intel PT debug log more useful
      
         - Support weak groups in perf record so it's behaving the same way as
           perf stat
      
         - Display the LBR stats in callchain entries properly in perf top
      
         - Handle different PMu names with common prefix properlin in pert
           stat
      
         - Start syscall augmenting in perf trace. Preparation for
           architecture independent eBPF instrumentation of syscalls.
      
         - Fix build breakage in JVMTI perf lib
      
         - Fix arm64 tools build failure wrt smp_load_{acquire,release}"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf tools: Do not zero sample_id_all for group members
        perf tools: Fix undefined symbol scnprintf in libperf-jvmti.so
        perf beauty: Use SRCARCH, ARCH=x86_64 must map to "x86" to find the headers
        perf intel-pt: Add MTC and CYC timestamps to debug log
        perf intel-pt: Add more event information to debug log
        perf scripts python: exported-sql-viewer.py: Fix table find when table re-ordered
        perf scripts python: exported-sql-viewer.py: Add help window
        perf scripts python: exported-sql-viewer.py: Add Selected branches report
        perf scripts python: exported-sql-viewer.py: Fall back to /usr/local/lib/libxed.so
        perf top: Display the LBR stats in callchain entry
        perf stat: Handle different PMU names with common prefix
        perf record: Support weak groups
        perf evlist: Move perf_evsel__reset_weak_group into evlist
        perf augmented_syscalls: Start collecting pathnames in the BPF program
        perf trace: Fix setting of augmented payload when using eBPF + raw_syscalls
        perf trace: When augmenting raw_syscalls plug raw_syscalls:sys_exit too
        perf examples bpf: Start augmenting raw_syscalls:sys_{start,exit}
        tools headers barrier: Fix arm64 tools build failure wrt smp_load_{acquire,release}
      655c6b97
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 08b52786
      Linus Torvalds authored
      Pull timer fix from Thomas Gleixner:
       "Just the removal of a redundant call into the sched deadline overrun
        check"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        posix-cpu-timers: Remove useless call to check_dl_overrun()
      08b52786
    • Linus Torvalds's avatar
      Merge branch 'sched/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 024d4d4c
      Linus Torvalds authored
      Pull scheduler fixes from Thomas Gleixner:
       "Two small scheduler fixes:
      
         - Take hotplug lock in sched_init_smp(). Technically not really
           required, but lockdep will complain other.
      
         - Trivial comment fix in sched/fair"
      
      * 'sched/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/fair: Fix a comment in task_numa_fault()
        sched/core: Take the hotplug lock in sched_init_smp()
      024d4d4c
    • Linus Torvalds's avatar
      Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 1acf93ca
      Linus Torvalds authored
      Pull locking build fix from Thomas Gleixner:
       "A single fix for a build fail with CONFIG_PROFILE_ALL_BRANCHES=y in
        the qspinlock code"
      
      * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/qspinlock: Fix compile error
      1acf93ca
    • Linus Torvalds's avatar
      Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 0b002cdd
      Linus Torvalds authored
      Pull core fixes from Thomas Gleixner:
       "A couple of fixlets for the core:
      
         - Kernel doc function documentation fixes
      
         - Missing prototypes for weak watchdog functions"
      
      * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        resource/docs: Complete kernel-doc style function documentation
        watchdog/core: Add missing prototypes for weak functions
        resource/docs: Fix new kernel-doc warnings
      0b002cdd
    • Eric Dumazet's avatar
      act_mirred: clear skb->tstamp on redirect · 7236ead1
      Eric Dumazet authored
      If sch_fq is used at ingress, skbs that might have been
      timestamped by net_timestamp_set() if a packet capture
      is requesting timestamps could be delayed by arbitrary
      amount of time, since sch_fq time base is MONOTONIC.
      
      Fix this problem by moving code from sch_netem.c to act_mirred.c.
      
      Fixes: fb420d5d ("tcp/fq: move back to CLOCK_MONOTONIC")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7236ead1
    • Andrew Lunn's avatar
      net: dsa: mv88e6xxx: Fix clearing of stats counters · a9049ff9
      Andrew Lunn authored
      The mv88e6161 would sometime fail to probe with a timeout waiting for
      the switch to complete an operation. This operation is supposed to
      clear the statistics counters. However, due to a read/modify/write,
      without the needed mask, the operation actually carried out was more
      random, with invalid parameters, resulting in the switch not
      responding. We need to preserve the histogram mode bits, so apply a
      mask to keep them.
      Reported-by: default avatarChris Healy <Chris.Healy@zii.aero>
      Fixes: 40cff8fc ("net: dsa: mv88e6xxx: Fix stats histogram mode")
      Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a9049ff9