1. 29 Mar, 2020 3 commits
    • Masahiro Yamada's avatar
      kbuild: add comment about grouped target · f463c351
      Masahiro Yamada authored
      GNU Make commit 8c888d95f618 ("[SV 8297] Implement "grouped targets"
      for explicit rules.") added the '&:' syntax.
      
      I think '&:' is a perfect fit here, but we cannot use it any time
      soon. Just add a TODO comment.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      f463c351
    • Masahiro Yamada's avatar
      kbuild: add -Wall to KBUILD_HOSTCXXFLAGS · 735aab1e
      Masahiro Yamada authored
      Add -Wall to catch more warnings for C++ host programs.
      
      When I submitted the previous version, the 0-day bot reported
      -Wc++11-compat warnings for old GCC:
      
        HOSTCXX -fPIC scripts/gcc-plugins/latent_entropy_plugin.o
      In file included from /usr/lib/gcc/x86_64-linux-gnu/4.8/plugin/include/tm.h:28:0,
                       from scripts/gcc-plugins/gcc-common.h:15,
                       from scripts/gcc-plugins/latent_entropy_plugin.c:78:
      /usr/lib/gcc/x86_64-linux-gnu/4.8/plugin/include/config/elfos.h:102:21: warning: C++11 requires a space between string literal and macro [-Wc++11-compat]
          fprintf ((FILE), "%s"HOST_WIDE_INT_PRINT_UNSIGNED"\n",\
                           ^
      /usr/lib/gcc/x86_64-linux-gnu/4.8/plugin/include/config/elfos.h:170:24: warning: C++11 requires a space between string literal and macro [-Wc++11-compat]
             fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n",  \
                              ^
      In file included from /usr/lib/gcc/x86_64-linux-gnu/4.8/plugin/include/tm.h:42:0,
                       from scripts/gcc-plugins/gcc-common.h:15,
                       from scripts/gcc-plugins/latent_entropy_plugin.c:78:
      /usr/lib/gcc/x86_64-linux-gnu/4.8/plugin/include/defaults.h:126:24: warning: C++11 requires a space between string literal and macro [-Wc++11-compat]
             fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n",  \
                              ^
      
      The source of the warnings is in the plugin headers, so we have no
      control of it. I just suppressed them by adding -Wno-c++11-compat to
      scripts/gcc-plugins/Makefile.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Acked-by: default avatarKees Cook <keescook@chromium.org>
      735aab1e
    • Masahiro Yamada's avatar
      kconfig: remove unused variable in qconf.cc · dbd35860
      Masahiro Yamada authored
      If this file were compiled with -Wall, the following warning would be
      reported:
      
      scripts/kconfig/qconf.cc:312:6: warning: unused variable ‘i’ [-Wunused-variable]
        int i;
            ^
      
      The commit prepares to turn on -Wall for C++ host programs.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Reviewed-by: default avatarKees Cook <keescook@chromium.org>
      dbd35860
  2. 25 Mar, 2020 3 commits
  3. 19 Mar, 2020 1 commit
  4. 13 Mar, 2020 8 commits
    • Masahiro Yamada's avatar
      kconfig: make 'imply' obey the direct dependency · 3a9dd3ec
      Masahiro Yamada authored
      The 'imply' statement may create unmet direct dependency when the
      implied symbol depends on m.
      
      [Test Code]
      
        config FOO
                tristate "foo"
                imply BAZ
      
        config BAZ
                tristate "baz"
                depends on BAR
      
        config BAR
                def_tristate m
      
        config MODULES
                def_bool y
                option modules
      
      If you set FOO=y, BAZ is also promoted to y, which results in the
      following .config file:
      
        CONFIG_FOO=y
        CONFIG_BAZ=y
        CONFIG_BAR=m
        CONFIG_MODULES=y
      
      This does not meet the dependency 'BAZ depends on BAR'.
      
      Unlike 'select', what is worse, Kconfig never shows the
      'WARNING: unmet direct dependencies detected for ...' for this case.
      
      Because 'imply' is considered to be weaker than 'depends on', Kconfig
      should take the direct dependency into account.
      
      For clarification, describe this case in kconfig-language.rst too.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Acked-by: default avatarNicolas Pitre <nico@fluxnic.net>
      Tested-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      3a9dd3ec
    • Masahiro Yamada's avatar
      kconfig: allow symbols implied by y to become m · def2fbff
      Masahiro Yamada authored
      The 'imply' keyword restricts a symbol to y or n, excluding m
      when it is implied by y. This is the original behavior since
      commit 237e3ad0 ("Kconfig: Introduce the "imply" keyword").
      
      However, the author of this feature, Nicolas Pitre, stated that
      the 'imply' keyword should not impose any restrictions.
      (https://lkml.org/lkml/2020/2/19/714)
      
      I agree, and want to get rid of this tricky behavior.
      Suggested-by: default avatarNicolas Pitre <nico@fluxnic.net>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Acked-by: default avatarNicolas Pitre <nico@fluxnic.net>
      def2fbff
    • Masahiro Yamada's avatar
      net: drop_monitor: use IS_REACHABLE() to guard net_dm_hw_report() · 1cd9b3ab
      Masahiro Yamada authored
      In net/Kconfig, NET_DEVLINK implies NET_DROP_MONITOR.
      
      The original behavior of the 'imply' keyword prevents NET_DROP_MONITOR
      from being 'm' when NET_DEVLINK=y.
      
      With the planned Kconfig change that relaxes the 'imply', the
      combination of NET_DEVLINK=y and NET_DROP_MONITOR=m would be allowed.
      
      Use IS_REACHABLE() to avoid the vmlinux link error for this case.
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      1cd9b3ab
    • Jessica Yu's avatar
      modpost: return error if module is missing ns imports and MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS=n · 54b77847
      Jessica Yu authored
      Currently when CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS=n, modpost
      only warns when a module is missing namespace imports. Under this
      configuration, such a module cannot be loaded into the kernel anyway, as
      the module loader would reject it. We might as well return a build
      error when a module is missing namespace imports under
      CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS=n, so that the build
      warning does not go ignored/unnoticed.
      Signed-off-by: default avatarJessica Yu <jeyu@kernel.org>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      54b77847
    • Jessica Yu's avatar
      modpost: rework and consolidate logging interface · 93c95e52
      Jessica Yu authored
      Rework modpost's logging interface by consolidating merror(), warn(), and
      fatal() to use a single function, modpost_log(). Introduce different
      logging levels (WARN, ERROR, FATAL) as well. The purpose of this cleanup is
      to reduce code duplication when deciding whether or not to warn or error
      out based on a condition.
      Signed-off-by: default avatarJessica Yu <jeyu@kernel.org>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      93c95e52
    • Masahiro Yamada's avatar
      kbuild: allow to run dt_binding_check without kernel configuration · 9dffecc1
      Masahiro Yamada authored
      The dt_binding_check target is located outside of the
      'ifneq ($(dtstree),) ... endif' block.
      
      So, you can run 'make dt_binding_check' on any architecture.
      This makes a perfect sense because the dt-schema is arch-agnostic.
      
      The only one problem I see is that scripts/dtc/dtc is not always built.
      For example, ARCH=x86 defconfig does not define CONFIG_DTC. Kbuild
      descends into scripts/dtc/ with doing nothing. Then, it fails to build
      *.example.dt.yaml files.
      
      Let's build scripts/dtc/dtc forcibly when running dt_binding_check.
      
      The dt-schema does not depend on any CONFIG option either, so you
      should be able to run dt_binding_check without the .config file.
      
      Going forward, you can directly run 'make dt_binding_check' in a
      pristine source tree.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Reviewed-by: default avatarRob Herring <robh@kernel.org>
      9dffecc1
    • Masahiro Yamada's avatar
      kbuild: allow to run dt_binding_check and dtbs_check in a single command · e10c4321
      Masahiro Yamada authored
      Since commit 93512dad ("dt-bindings: Improve validation build error
      handling"), 'make dtbs_check' does not validate the schema fully.
      
      If you want to check everything, you need to run two commands separately.
      
        $ make ARCH=arm dt_binding_check
        $ make ARCH=arm dtbs_check
      
      They are exclusive each other, so you cannot do like this:
      
        $ make ARCH=arm dt_binding_check dtbs_check
      
      In this case, dt-doc-validate and dt-extract-example are skipped
      because CHECK_DTBS is set.
      
      Let's make it possible to run these two targets in a single command.
      It will be useful for schema writers.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Reviewed-by: default avatarRob Herring <robh@kernel.org>
      e10c4321
    • Masahiro Yamada's avatar
      kbuild: avoid concurrency issue in parallel building dtbs and dtbs_check · b5154bf6
      Masahiro Yamada authored
      'make dtbs_check' checks the shecma in addition to building *.dtb files,
      in other words, 'make dtbs_check' is a super-set of 'make dtbs'.
      So, you do not have to do 'make dtbs dtbs_check', but I want to keep
      the build system as robust as possible in any use.
      
      Currently, 'dtbs' and 'dtbs_check' are independent of each other.
      In parallel building, two threads descend into arch/*/boot/dts/,
      one for dtbs and the other for dtbs_check, then end up with building
      the same DTB simultaneously.
      
      This commit fixes the concurrency issue. Otherwise, I see build errors
      like follows:
      
      $ make ARCH=arm64 defconfig
      $ make -j16 ARCH=arm64 DT_SCHEMA_FILES=Documentation/devicetree/bindings/arm/psci.yaml dtbs dtbs_check
        <snip>
        DTC     arch/arm64/boot/dts/qcom/sdm845-cheza-r2.dtb
        DTC     arch/arm64/boot/dts/amlogic/meson-gxl-s905x-p212.dtb
        DTC     arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-lite2.dtb
        DTC     arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-lite2.dtb
        DTC     arch/arm64/boot/dts/freescale/imx8mn-evk.dtb
        DTC     arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-plus.dtb
        DTC     arch/arm64/boot/dts/zte/zx296718-pcbox.dtb
        DTC     arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dt.yaml
        DTC     arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dtb
        DTC     arch/arm64/boot/dts/xilinx/zynqmp-zc1254-revA.dtb
        DTC     arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dtb
        DTC     arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet-inx.dtb
        DTC     arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-plus.dtb
        CHECK   arch/arm64/boot/dts/altera/socfpga_stratix10_socdk.dt.yaml
      fixdep: error opening file: arch/arm64/boot/dts/allwinner/.sun50i-h6-orangepi-lite2.dtb.d: No such file or directory
      make[2]: *** [scripts/Makefile.lib:296: arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-lite2.dtb] Error 2
      make[2]: *** Deleting file 'arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-lite2.dtb'
      make[2]: *** Waiting for unfinished jobs....
        DTC     arch/arm64/boot/dts/rockchip/rk3399-gru-scarlet-kd.dtb
        DTC     arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p231.dtb
        DTC     arch/arm64/boot/dts/xilinx/zynqmp-zc1275-revA.dtb
        DTC     arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk.dtb
      fixdep: parse error; no targets found
      make[2]: *** [scripts/Makefile.lib:296: arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-plus.dtb] Error 1
      make[2]: *** Deleting file 'arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-plus.dtb'
      make[1]: *** [scripts/Makefile.build:505: arch/arm64/boot/dts/allwinner] Error 2
      make[1]: *** Waiting for unfinished jobs....
        DTC     arch/arm64/boot/dts/renesas/r8a77951-salvator-xs.dtb
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Reviewed-by: default avatarRob Herring <robh@kernel.org>
      b5154bf6
  5. 03 Mar, 2020 8 commits
  6. 02 Mar, 2020 4 commits
    • Masahiro Yamada's avatar
      fixdep: remove redundant null character check · 3f9070a6
      Masahiro Yamada authored
      If *q is '\0', the condition (isalnum(*q) || *q == '_') is false anyway.
      
      It is redundant to ensure non-zero *q.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      3f9070a6
    • Masahiro Yamada's avatar
      fixdep: remove unneeded code and comments about *.ver files · 87d660f0
      Masahiro Yamada authored
      This is probably stale code. In old days (~ Linux 2.5.59), Kbuild made
      genksyms generate include/linux/modules/*.ver files.
      
      The currenct Kbuild does not generate *.ver files at all.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      87d660f0
    • Masahiro Yamada's avatar
      kbuild: remove cc-option switch from -Wframe-larger-than= · a83e4ca2
      Masahiro Yamada authored
      This CONFIG option was added by commit 35bb5b1e ("Add option to
      enable -Wframe-larger-than= on gcc 4.4"). At that time, the cc-option
      check was needed.
      
      According to Documentation/process/changes.rst, the current minimal
      supported version of GCC is 4.6, so you can assume GCC supports it.
      Clang supports it as well.
      
      Remove the cc-option switch and redundant comments.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Reviewed-by: default avatarNathan Chancellor <natechancellor@gmail.com>
      Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      a83e4ca2
    • Masahiro Yamada's avatar
      kbuild: remove the owner check in mkcompile_h · f84fdf8d
      Masahiro Yamada authored
      This reverts a very old commit, which dates back to the pre-git era:
      
      |commit 5d1cfb5b
      |Author: Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
      |Date:   Sat Jul 27 02:53:19 2002 -0500
      |
      |    kbuild: Fix compiling/installing as different users
      |
      |    "make bzImage && sudo make install" had the problem that during
      |    the "sudo make install" the build system would notice that the information
      |    in include/linux/compile.h is not accurate (it says "compiled by <user>",
      |    but we are root), thus causing compile.h to be updated and leading to
      |    some recompiles.
      |
      |    We now only update "compile.h" if the current user is the owner of
      |    include/linux/autoconf.h, i.e. the user who did the "make *config". So the
      |    above sequence will correctly state "compiled by <user>".
      |
      |diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h
      |index 6313db96172..cd956380978 100755
      |--- a/scripts/mkcompile_h
      |+++ b/scripts/mkcompile_h
      |@@ -3,6 +3,17 @@ ARCH=$2
      | SMP=$3
      | CC=$4
      |
      |+# If compile.h exists already and we don't own autoconf.h
      |+# (i.e. we're not the same user who did make *config), don't
      |+# modify compile.h
      |+# So "sudo make install" won't change the "compiled by <user>"
      |+# do "compiled by root"
      |+
      |+if [ -r $TARGET -a ! -O ../include/linux/autoconf.h ]; then
      |+  echo ' (not modified)'
      |+  exit 0
      |+fi
      |+
      | if [ -r ../.version ]; then
      |   VERSION=`cat ../.version`
      | else
      
      The 'make bzImage && sudo make install' problem no longer happens
      because commit 1648e4f8 ("x86, kbuild: make "make install" not
      depend on vmlinux") fixed the root cause.
      
      Commit 19514fc6 ("arm, kbuild: make "make install" not depend on
      vmlinux") fixed the similar issue on ARM, with detailed explanation.
      
      So, the rule is that the installation targets should never trigger
      the builds of any build artifact. By following it, this check is
      unneeded.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      f84fdf8d
  7. 01 Mar, 2020 5 commits
  8. 29 Feb, 2020 4 commits
    • Dan Carpenter's avatar
      ext4: potential crash on allocation error in ext4_alloc_flex_bg_array() · 37b0b6b8
      Dan Carpenter authored
      If sbi->s_flex_groups_allocated is zero and the first allocation fails
      then this code will crash.  The problem is that "i--" will set "i" to
      -1 but when we compare "i >= sbi->s_flex_groups_allocated" then the -1
      is type promoted to unsigned and becomes UINT_MAX.  Since UINT_MAX
      is more than zero, the condition is true so we call kvfree(new_groups[-1]).
      The loop will carry on freeing invalid memory until it crashes.
      
      Fixes: 7c990728 ("ext4: fix potential race between s_flex_groups online resizing and access")
      Reviewed-by: default avatarSuraj Jitindar Singh <surajjs@amazon.com>
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Cc: stable@kernel.org
      Link: https://lore.kernel.org/r/20200228092142.7irbc44yaz3by7nb@kili.mountainSigned-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      37b0b6b8
    • Wolfram Sang's avatar
      macintosh: therm_windtunnel: fix regression when instantiating devices · 38b17afb
      Wolfram Sang authored
      Removing attach_adapter from this driver caused a regression for at
      least some machines. Those machines had the sensors described in their
      DT, too, so they didn't need manual creation of the sensor devices. The
      old code worked, though, because manual creation came first. Creation of
      DT devices then failed later and caused error logs, but the sensors
      worked nonetheless because of the manually created devices.
      
      When removing attach_adaper, manual creation now comes later and loses
      the race. The sensor devices were already registered via DT, yet with
      another binding, so the driver could not be bound to it.
      
      This fix refactors the code to remove the race and only manually creates
      devices if there are no DT nodes present. Also, the DT binding is updated
      to match both, the DT and manually created devices. Because we don't
      know which device creation will be used at runtime, the code to start
      the kthread is moved to do_probe() which will be called by both methods.
      
      Fixes: 3e7bed52 ("macintosh: therm_windtunnel: drop using attach_adapter")
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=201723Reported-by: default avatarErhard Furtner <erhard_f@mailbox.org>
      Tested-by: default avatarErhard Furtner <erhard_f@mailbox.org>
      Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      Cc: stable@kernel.org # v4.19+
      38b17afb
    • Qian Cai's avatar
      jbd2: fix data races at struct journal_head · 6c5d9112
      Qian Cai authored
      journal_head::b_transaction and journal_head::b_next_transaction could
      be accessed concurrently as noticed by KCSAN,
      
       LTP: starting fsync04
       /dev/zero: Can't open blockdev
       EXT4-fs (loop0): mounting ext3 file system using the ext4 subsystem
       EXT4-fs (loop0): mounted filesystem with ordered data mode. Opts: (null)
       ==================================================================
       BUG: KCSAN: data-race in __jbd2_journal_refile_buffer [jbd2] / jbd2_write_access_granted [jbd2]
      
       write to 0xffff99f9b1bd0e30 of 8 bytes by task 25721 on cpu 70:
        __jbd2_journal_refile_buffer+0xdd/0x210 [jbd2]
        __jbd2_journal_refile_buffer at fs/jbd2/transaction.c:2569
        jbd2_journal_commit_transaction+0x2d15/0x3f20 [jbd2]
        (inlined by) jbd2_journal_commit_transaction at fs/jbd2/commit.c:1034
        kjournald2+0x13b/0x450 [jbd2]
        kthread+0x1cd/0x1f0
        ret_from_fork+0x27/0x50
      
       read to 0xffff99f9b1bd0e30 of 8 bytes by task 25724 on cpu 68:
        jbd2_write_access_granted+0x1b2/0x250 [jbd2]
        jbd2_write_access_granted at fs/jbd2/transaction.c:1155
        jbd2_journal_get_write_access+0x2c/0x60 [jbd2]
        __ext4_journal_get_write_access+0x50/0x90 [ext4]
        ext4_mb_mark_diskspace_used+0x158/0x620 [ext4]
        ext4_mb_new_blocks+0x54f/0xca0 [ext4]
        ext4_ind_map_blocks+0xc79/0x1b40 [ext4]
        ext4_map_blocks+0x3b4/0x950 [ext4]
        _ext4_get_block+0xfc/0x270 [ext4]
        ext4_get_block+0x3b/0x50 [ext4]
        __block_write_begin_int+0x22e/0xae0
        __block_write_begin+0x39/0x50
        ext4_write_begin+0x388/0xb50 [ext4]
        generic_perform_write+0x15d/0x290
        ext4_buffered_write_iter+0x11f/0x210 [ext4]
        ext4_file_write_iter+0xce/0x9e0 [ext4]
        new_sync_write+0x29c/0x3b0
        __vfs_write+0x92/0xa0
        vfs_write+0x103/0x260
        ksys_write+0x9d/0x130
        __x64_sys_write+0x4c/0x60
        do_syscall_64+0x91/0xb05
        entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
       5 locks held by fsync04/25724:
        #0: ffff99f9911093f8 (sb_writers#13){.+.+}, at: vfs_write+0x21c/0x260
        #1: ffff99f9db4c0348 (&sb->s_type->i_mutex_key#15){+.+.}, at: ext4_buffered_write_iter+0x65/0x210 [ext4]
        #2: ffff99f5e7dfcf58 (jbd2_handle){++++}, at: start_this_handle+0x1c1/0x9d0 [jbd2]
        #3: ffff99f9db4c0168 (&ei->i_data_sem){++++}, at: ext4_map_blocks+0x176/0x950 [ext4]
        #4: ffffffff99086b40 (rcu_read_lock){....}, at: jbd2_write_access_granted+0x4e/0x250 [jbd2]
       irq event stamp: 1407125
       hardirqs last  enabled at (1407125): [<ffffffff980da9b7>] __find_get_block+0x107/0x790
       hardirqs last disabled at (1407124): [<ffffffff980da8f9>] __find_get_block+0x49/0x790
       softirqs last  enabled at (1405528): [<ffffffff98a0034c>] __do_softirq+0x34c/0x57c
       softirqs last disabled at (1405521): [<ffffffff97cc67a2>] irq_exit+0xa2/0xc0
      
       Reported by Kernel Concurrency Sanitizer on:
       CPU: 68 PID: 25724 Comm: fsync04 Tainted: G L 5.6.0-rc2-next-20200221+ #7
       Hardware name: HPE ProLiant DL385 Gen10/ProLiant DL385 Gen10, BIOS A40 07/10/2019
      
      The plain reads are outside of jh->b_state_lock critical section which result
      in data races. Fix them by adding pairs of READ|WRITE_ONCE().
      Reviewed-by: default avatarJan Kara <jack@suse.cz>
      Signed-off-by: default avatarQian Cai <cai@lca.pw>
      Link: https://lore.kernel.org/r/20200222043111.2227-1-cai@lca.pwSigned-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      6c5d9112
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 7557c1b3
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Four small fixes.
      
        Three are in drivers for fairly obvious bugs. The fourth is a set of
        regressions introduced by the compat_ioctl changes because some of the
        compat updates wrongly replaced .ioctl instead of .compat_ioctl"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: compat_ioctl: cdrom: Replace .ioctl with .compat_ioctl in four appropriate places
        scsi: zfcp: fix wrong data and display format of SFP+ temperature
        scsi: sd_sbc: Fix sd_zbc_report_zones()
        scsi: libfc: free response frame from GPN_ID
      7557c1b3
  9. 28 Feb, 2020 4 commits
    • Linus Torvalds's avatar
      Merge tag 'pci-v5.6-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · 29795de0
      Linus Torvalds authored
      Pull PCI fixes from Bjorn Helgaas:
      
       - Fix build issue on 32-bit ARM with old compilers (Marek Szyprowski)
      
       - Update MAINTAINERS for recent Cadence driver file move (Lukas
         Bulwahn)
      
      * tag 'pci-v5.6-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        MAINTAINERS: Correct Cadence PCI driver path
        PCI: brcmstb: Fix build on 32bit ARM platforms with older compilers
      29795de0
    • Linus Torvalds's avatar
      Merge tag 'block-5.6-2020-02-28' of git://git.kernel.dk/linux-block · 2edc78b9
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
      
       - Passthrough insertion fix (Ming)
      
       - Kill off some unused arguments (John)
      
       - blktrace RCU fix (Jan)
      
       - Dead fields removal for null_blk (Dongli)
      
       - NVMe polled IO fix (Bijan)
      
      * tag 'block-5.6-2020-02-28' of git://git.kernel.dk/linux-block:
        nvme-pci: Hold cq_poll_lock while completing CQEs
        blk-mq: Remove some unused function arguments
        null_blk: remove unused fields in 'nullb_cmd'
        blktrace: Protect q->blk_trace with RCU
        blk-mq: insert passthrough request into hctx->dispatch directly
      2edc78b9
    • Linus Torvalds's avatar
      Merge tag 'io_uring-5.6-2020-02-28' of git://git.kernel.dk/linux-block · 74dea5d9
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
      
       - Fix for a race with IOPOLL used with SQPOLL (Xiaoguang)
      
       - Only show ->fdinfo if procfs is enabled (Tobias)
      
       - Fix for a chain with multiple personalities in the SQEs
      
       - Fix for a missing free of personality idr on exit
      
       - Removal of the spin-for-work optimization
      
       - Fix for next work lookup on request completion
      
       - Fix for non-vec read/write result progation in case of links
      
       - Fix for a fileset references on switch
      
       - Fix for a recvmsg/sendmsg 32-bit compatability mode
      
      * tag 'io_uring-5.6-2020-02-28' of git://git.kernel.dk/linux-block:
        io_uring: fix 32-bit compatability with sendmsg/recvmsg
        io_uring: define and set show_fdinfo only if procfs is enabled
        io_uring: drop file set ref put/get on switch
        io_uring: import_single_range() returns 0/-ERROR
        io_uring: pick up link work on submit reference drop
        io-wq: ensure work->task_pid is cleared on init
        io-wq: remove spin-for-work optimization
        io_uring: fix poll_list race for SETUP_IOPOLL|SETUP_SQPOLL
        io_uring: fix personality idr leak
        io_uring: handle multiple personalities in link chains
      74dea5d9
    • Jens Axboe's avatar
      Merge branch 'nvme-5.6-rc4' of git://git.infradead.org/nvme into block-5.6 · 5b8ea58b
      Jens Axboe authored
      Pull NVMe fix from Keith.
      
      * 'nvme-5.6-rc4' of git://git.infradead.org/nvme:
        nvme-pci: Hold cq_poll_lock while completing CQEs
      5b8ea58b