Merge tag 'rcu.6.4.april5.2023.3' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 24 Apr 2023 19:16:14 +0000 (12:16 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 24 Apr 2023 19:16:14 +0000 (12:16 -0700)
Pull RCU updates from Joel Fernandes:

 - Updates and additions to MAINTAINERS files, with Boqun being added to
   the RCU entry and Zqiang being added as an RCU reviewer.

   I have also transitioned from reviewer to maintainer; however, Paul
   will be taking over sending RCU pull-requests for the next merge
   window.

 - Resolution of hotplug warning in nohz code, achieved by fixing
   cpu_is_hotpluggable() through interaction with the nohz subsystem.

   Tick dependency modifications by Zqiang, focusing on fixing usage of
   the TICK_DEP_BIT_RCU_EXP bitmask.

 - Avoid needless calls to the rcu-lazy shrinker for CONFIG_RCU_LAZY=n
   kernels, fixed by Zqiang.

 - Improvements to rcu-tasks stall reporting by Neeraj.

 - Initial renaming of k[v]free_rcu() to k[v]free_rcu_mightsleep() for
   increased robustness, affecting several components like mac802154,
   drbd, vmw_vmci, tracing, and more.

   A report by Eric Dumazet showed that the API could be unknowingly
   used in an atomic context, so we'd rather make sure they know what
   they're asking for by being explicit:

      https://lore.kernel.org/all/20221202052847.2623997-1-edumazet@google.com/

 - Documentation updates, including corrections to spelling,
   clarifications in comments, and improvements to the srcu_size_state
   comments.

 - Better srcu_struct cache locality for readers, by adjusting the size
   of srcu_struct in support of SRCU usage by Christoph Hellwig.

 - Teach lockdep to detect deadlocks between srcu_read_lock() vs
   synchronize_srcu() contributed by Boqun.

   Previously lockdep could not detect such deadlocks, now it can.

 - Integration of rcutorture and rcu-related tools, targeted for v6.4
   from Boqun's tree, featuring new SRCU deadlock scenarios, test_nmis
   module parameter, and more

 - Miscellaneous changes, various code cleanups and comment improvements

* tag 'rcu.6.4.april5.2023.3' of git://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux: (71 commits)
  checkpatch: Error out if deprecated RCU API used
  mac802154: Rename kfree_rcu() to kvfree_rcu_mightsleep()
  rcuscale: Rename kfree_rcu() to kfree_rcu_mightsleep()
  ext4/super: Rename kfree_rcu() to kfree_rcu_mightsleep()
  net/mlx5: Rename kfree_rcu() to kfree_rcu_mightsleep()
  net/sysctl: Rename kvfree_rcu() to kvfree_rcu_mightsleep()
  lib/test_vmalloc.c: Rename kvfree_rcu() to kvfree_rcu_mightsleep()
  tracing: Rename kvfree_rcu() to kvfree_rcu_mightsleep()
  misc: vmw_vmci: Rename kvfree_rcu() to kvfree_rcu_mightsleep()
  drbd: Rename kvfree_rcu() to kvfree_rcu_mightsleep()
  rcu: Protect rcu_print_task_exp_stall() ->exp_tasks access
  rcu: Avoid stack overflow due to __rcu_irq_enter_check_tick() being kprobe-ed
  rcu-tasks: Report stalls during synchronize_srcu() in rcu_tasks_postscan()
  rcu: Permit start_poll_synchronize_rcu_expedited() to be invoked early
  rcu: Remove never-set needwake assignment from rcu_report_qs_rdp()
  rcu: Register rcu-lazy shrinker only for CONFIG_RCU_LAZY=y kernels
  rcu: Fix missing TICK_DEP_MASK_RCU_EXP dependency check
  rcu: Fix set/clear TICK_DEP_BIT_RCU_EXP bitmask race
  rcu/trace: use strscpy() to instead of strncpy()
  tick/nohz: Fix cpu_is_hotpluggable() by checking with nohz subsystem
  ...

1  2 
MAINTAINERS
drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c
fs/ext4/super.c
include/trace/events/rcu.h
kernel/rcu/tree.c
kernel/trace/trace_osnoise.c

diff --combined MAINTAINERS
index 456285afd71684ebe167540f6a1881b3fb2de959,e03067b857a26c52b1d45d050db0d7a7aec4c07c..d172ca02a1d55f2a77aa59caa75f54ed9062867d
@@@ -73,7 -73,7 +73,7 @@@ Tips for patch submitter
        and ideally, should come with a patch proposal. Please do not send
        automated reports to this list either. Such bugs will be handled
        better and faster in the usual public places. See
 -      Documentation/admin-guide/security-bugs.rst for details.
 +      Documentation/process/security-bugs.rst for details.
  
  8.    Happy hacking.
  
@@@ -224,13 -224,13 +224,13 @@@ S:      Orphan / Obsolet
  F:    drivers/net/ethernet/8390/
  
  9P FILE SYSTEM
 -M:    Eric Van Hensbergen <ericvh@gmail.com>
 +M:    Eric Van Hensbergen <ericvh@kernel.org>
  M:    Latchesar Ionkov <lucho@ionkov.net>
  M:    Dominique Martinet <asmadeus@codewreck.org>
  R:    Christian Schoenebeck <linux_oss@crudebyte.com>
 -L:    v9fs-developer@lists.sourceforge.net
 +L:    v9fs@lists.linux.dev
  S:    Maintained
 -W:    http://swik.net/v9fs
 +W:    http://github.com/v9fs
  Q:    http://patchwork.kernel.org/project/v9fs-devel/list/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs.git
  T:    git git://github.com/martinetd/linux.git
@@@ -4461,14 -4461,14 +4461,14 @@@ F:   Documentation/devicetree/bindings/ne
  F:    drivers/net/ieee802154/ca8210.c
  
  CANAAN/KENDRYTE K210 SOC FPIOA DRIVER
 -M:    Damien Le Moal <damien.lemoal@wdc.com>
 +M:    Damien Le Moal <dlemoal@kernel.org>
  L:    linux-riscv@lists.infradead.org
  L:    linux-gpio@vger.kernel.org (pinctrl driver)
  F:    Documentation/devicetree/bindings/pinctrl/canaan,k210-fpioa.yaml
  F:    drivers/pinctrl/pinctrl-k210.c
  
  CANAAN/KENDRYTE K210 SOC RESET CONTROLLER DRIVER
 -M:    Damien Le Moal <damien.lemoal@wdc.com>
 +M:    Damien Le Moal <dlemoal@kernel.org>
  L:    linux-kernel@vger.kernel.org
  L:    linux-riscv@lists.infradead.org
  S:    Maintained
@@@ -4476,7 -4476,7 +4476,7 @@@ F:      Documentation/devicetree/bindings/re
  F:    drivers/reset/reset-k210.c
  
  CANAAN/KENDRYTE K210 SOC SYSTEM CONTROLLER DRIVER
 -M:    Damien Le Moal <damien.lemoal@wdc.com>
 +M:    Damien Le Moal <dlemoal@kernel.org>
  L:    linux-riscv@lists.infradead.org
  S:    Maintained
  F:      Documentation/devicetree/bindings/mfd/canaan,k210-sysctl.yaml
@@@ -5971,7 -5971,7 +5971,7 @@@ F:      include/linux/dm-*.
  F:    include/uapi/linux/dm-*.h
  
  DEVLINK
 -M:    Jiri Pirko <jiri@nvidia.com>
 +M:    Jiri Pirko <jiri@resnulli.us>
  L:    netdev@vger.kernel.org
  S:    Supported
  F:    Documentation/networking/devlink
@@@ -8216,7 -8216,6 +8216,7 @@@ F:      drivers/net/ethernet/freescale/dpa
  
  FREESCALE QORIQ DPAA FMAN DRIVER
  M:    Madalin Bucur <madalin.bucur@nxp.com>
 +R:    Sean Anderson <sean.anderson@seco.com>
  L:    netdev@vger.kernel.org
  S:    Maintained
  F:    Documentation/devicetree/bindings/net/fsl-fman.txt
@@@ -9872,10 -9871,10 +9872,10 @@@ M:   Christian Brauner <brauner@kernel.or
  M:    Seth Forshee <sforshee@kernel.org>
  L:    linux-fsdevel@vger.kernel.org
  S:    Maintained
 -T:    git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/vfs/idmapping.git
  F:    Documentation/filesystems/idmappings.rst
 -F:    tools/testing/selftests/mount_setattr/
  F:    include/linux/mnt_idmapping.*
 +F:    tools/testing/selftests/mount_setattr/
  
  IDT VersaClock 5 CLOCK DRIVER
  M:    Luca Ceresoli <luca@lucaceresoli.net>
@@@ -11758,7 -11757,7 +11758,7 @@@ T:   git git://git.kernel.org/pub/scm/lin
  F:    drivers/ata/sata_promise.*
  
  LIBATA SUBSYSTEM (Serial and Parallel ATA drivers)
 -M:    Damien Le Moal <damien.lemoal@opensource.wdc.com>
 +M:    Damien Le Moal <dlemoal@kernel.org>
  L:    linux-ide@vger.kernel.org
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata.git
@@@ -14594,7 -14593,6 +14594,7 @@@ F:   net/netlabel
  
  NETWORKING [MPTCP]
  M:    Matthieu Baerts <matthieu.baerts@tessares.net>
 +M:    Mat Martineau <martineau@kernel.org>
  L:    netdev@vger.kernel.org
  L:    mptcp@lists.linux.dev
  S:    Maintained
@@@ -14658,8 -14656,10 +14658,8 @@@ F:  net/ipv4/nexthop.
  
  NFC SUBSYSTEM
  M:    Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
 -L:    linux-nfc@lists.01.org (subscribers-only)
  L:    netdev@vger.kernel.org
  S:    Maintained
 -B:    mailto:linux-nfc@lists.01.org
  F:    Documentation/devicetree/bindings/net/nfc/
  F:    drivers/nfc/
  F:    include/linux/platform_data/nfcmrvl.h
@@@ -14670,6 -14670,7 +14670,6 @@@ F:   net/nfc
  NFC VIRTUAL NCI DEVICE DRIVER
  M:    Bongsu Jeon <bongsu.jeon@samsung.com>
  L:    netdev@vger.kernel.org
 -L:    linux-nfc@lists.01.org (subscribers-only)
  S:    Supported
  F:    drivers/nfc/virtual_ncidev.c
  F:    tools/testing/selftests/nci/
@@@ -14871,12 -14872,12 +14871,12 @@@ M:        Sagi Grimberg <sagi@grimberg.me
  L:    linux-nvme@lists.infradead.org
  S:    Supported
  W:    http://git.infradead.org/nvme.git
 -T:    git://git.infradead.org/nvme.git
 +T:    git git://git.infradead.org/nvme.git
  F:    Documentation/nvme/
 -F:    drivers/nvme/host/
  F:    drivers/nvme/common/
 -F:    include/linux/nvme.h
 +F:    drivers/nvme/host/
  F:    include/linux/nvme-*.h
 +F:    include/linux/nvme.h
  F:    include/uapi/linux/nvme_ioctl.h
  
  NVM EXPRESS FABRICS AUTHENTICATION
@@@ -14911,7 -14912,7 +14911,7 @@@ M:   Chaitanya Kulkarni <kch@nvidia.com
  L:    linux-nvme@lists.infradead.org
  S:    Supported
  W:    http://git.infradead.org/nvme.git
 -T:    git://git.infradead.org/nvme.git
 +T:    git git://git.infradead.org/nvme.git
  F:    drivers/nvme/target/
  
  NVMEM FRAMEWORK
@@@ -15041,6 -15042,7 +15041,6 @@@ F:   Documentation/devicetree/bindings/so
  F:    sound/soc/codecs/tfa989x.c
  
  NXP-NCI NFC DRIVER
 -L:    linux-nfc@lists.01.org (subscribers-only)
  S:    Orphan
  F:    Documentation/devicetree/bindings/net/nfc/nxp,nci.yaml
  F:    drivers/nfc/nxp-nci
@@@ -15077,7 -15079,7 +15077,7 @@@ F:   Documentation/hwmon/nzxt-smart2.rs
  F:    drivers/hwmon/nzxt-smart2.c
  
  OBJAGG
 -M:    Jiri Pirko <jiri@nvidia.com>
 +M:    Jiri Pirko <jiri@resnulli.us>
  L:    netdev@vger.kernel.org
  S:    Supported
  F:    include/linux/objagg.h
@@@ -15851,7 -15853,7 +15851,7 @@@ F:   drivers/video/logo/logo_parisc
  F:    include/linux/hp_sdc.h
  
  PARMAN
 -M:    Jiri Pirko <jiri@nvidia.com>
 +M:    Jiri Pirko <jiri@resnulli.us>
  L:    netdev@vger.kernel.org
  S:    Supported
  F:    include/linux/parman.h
@@@ -16389,7 -16391,6 +16389,7 @@@ R:   Alexander Shishkin <alexander.shishk
  R:    Jiri Olsa <jolsa@kernel.org>
  R:    Namhyung Kim <namhyung@kernel.org>
  R:    Ian Rogers <irogers@google.com>
 +R:    Adrian Hunter <adrian.hunter@intel.com>
  L:    linux-perf-users@vger.kernel.org
  L:    linux-kernel@vger.kernel.org
  S:    Supported
@@@ -17636,11 -17637,13 +17636,13 @@@ READ-COPY UPDATE (RCU
  M:    "Paul E. McKenney" <paulmck@kernel.org>
  M:    Frederic Weisbecker <frederic@kernel.org> (kernel/rcu/tree_nocb.h)
  M:    Neeraj Upadhyay <quic_neeraju@quicinc.com> (kernel/rcu/tasks.h)
+ M:    Joel Fernandes <joel@joelfernandes.org>
  M:    Josh Triplett <josh@joshtriplett.org>
+ M:    Boqun Feng <boqun.feng@gmail.com>
  R:    Steven Rostedt <rostedt@goodmis.org>
  R:    Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  R:    Lai Jiangshan <jiangshanlai@gmail.com>
- R:    Joel Fernandes <joel@joelfernandes.org>
+ R:    Zqiang <qiang1.zhang@intel.com>
  L:    rcu@vger.kernel.org
  S:    Supported
  W:    http://www.rdrop.com/users/paulmck/RCU/
@@@ -17988,7 -17991,7 +17990,7 @@@ F:   Documentation/devicetree/bindings/sp
  F:    Documentation/devicetree/bindings/usb/microchip,mpfs-musb.yaml
  F:    arch/riscv/boot/dts/microchip/
  F:    drivers/char/hw_random/mpfs-rng.c
 -F:    drivers/clk/microchip/clk-mpfs.c
 +F:    drivers/clk/microchip/clk-mpfs*.c
  F:    drivers/i2c/busses/i2c-microchip-corei2c.c
  F:    drivers/mailbox/mailbox-mpfs.c
  F:    drivers/pci/controller/pcie-microchip-host.c
@@@ -18289,9 -18292,8 +18291,9 @@@ F:   drivers/s390/block/dasd
  F:    include/linux/dasd_mod.h
  
  S390 IOMMU (PCI)
 +M:    Niklas Schnelle <schnelle@linux.ibm.com>
  M:    Matthew Rosato <mjrosato@linux.ibm.com>
 -M:    Gerald Schaefer <gerald.schaefer@linux.ibm.com>
 +R:    Gerald Schaefer <gerald.schaefer@linux.ibm.com>
  L:    linux-s390@vger.kernel.org
  S:    Supported
  F:    drivers/iommu/s390-iommu.c
@@@ -18486,6 -18488,7 +18488,6 @@@ F:   include/media/drv-intf/s3c_camif.
  
  SAMSUNG S3FWRN5 NFC DRIVER
  M:    Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
 -L:    linux-nfc@lists.01.org (subscribers-only)
  S:    Maintained
  F:    Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml
  F:    drivers/nfc/s3fwrn5
@@@ -18800,7 -18803,7 +18802,7 @@@ F:   include/uapi/linux/sed
  SECURITY CONTACT
  M:    Security Officers <security@kernel.org>
  S:    Supported
 -F:    Documentation/admin-guide/security-bugs.rst
 +F:    Documentation/process/security-bugs.rst
  
  SECURITY SUBSYSTEM
  M:    Paul Moore <paul@paul-moore.com>
@@@ -18822,8 -18825,8 +18824,8 @@@ S:   Supporte
  W:    https://selinuxproject.org
  W:    https://github.com/SELinuxProject
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux.git
 -F:    Documentation/ABI/obsolete/sysfs-selinux-checkreqprot
 -F:    Documentation/ABI/obsolete/sysfs-selinux-disable
 +F:    Documentation/ABI/removed/sysfs-selinux-checkreqprot
 +F:    Documentation/ABI/removed/sysfs-selinux-disable
  F:    Documentation/admin-guide/LSM/SELinux.rst
  F:    include/trace/events/avc.h
  F:    include/uapi/linux/selinux_netlink.h
@@@ -19148,7 -19151,9 +19150,7 @@@ W:   http://www.brownhat.org/sis900.htm
  F:    drivers/net/ethernet/sis/sis900.*
  
  SIS FRAMEBUFFER DRIVER
 -M:    Thomas Winischhofer <thomas@winischhofer.net>
 -S:    Maintained
 -W:    http://www.winischhofer.net/linuxsisvga.shtml
 +S:    Orphan
  F:    Documentation/fb/sisfb.rst
  F:    drivers/video/fbdev/sis/
  F:    include/video/sisfb.h
@@@ -19860,6 -19865,13 +19862,6 @@@ S:  Maintaine
  W:    http://wiki.laptop.org/go/DCON
  F:    drivers/staging/olpc_dcon/
  
 -STAGING - REALTEK RTL8188EU DRIVERS
 -M:    Larry Finger <Larry.Finger@lwfinger.net>
 -M:    Phillip Potter <phil@philpotter.co.uk>
 -R:    Pavel Skripkin <paskripkin@gmail.com>
 -S:    Supported
 -F:    drivers/staging/r8188eu/
 -
  STAGING - REALTEK RTL8712U DRIVERS
  M:    Larry Finger <Larry.Finger@lwfinger.net>
  M:    Florian Schilhabel <florian.c.schilhabel@googlemail.com>.
@@@ -20643,6 -20655,7 +20645,6 @@@ F:   sound/soc/codecs/tscs*.
  TENSILICA XTENSA PORT (xtensa)
  M:    Chris Zankel <chris@zankel.net>
  M:    Max Filippov <jcmvbkbc@gmail.com>
 -L:    linux-xtensa@linux-xtensa.org
  S:    Maintained
  T:    git https://github.com/jcmvbkbc/linux-xtensa.git
  F:    arch/xtensa/
@@@ -20978,6 -20991,7 +20980,6 @@@ F:   drivers/iio/magnetometer/tmag5273.
  TI TRF7970A NFC DRIVER
  M:    Mark Greer <mgreer@animalcreek.com>
  L:    linux-wireless@vger.kernel.org
 -L:    linux-nfc@lists.01.org (subscribers-only)
  S:    Supported
  F:    Documentation/devicetree/bindings/net/nfc/ti,trf7970a.yaml
  F:    drivers/nfc/trf7970a.c
@@@ -21639,7 -21653,6 +21641,7 @@@ USB OVER IP DRIVE
  M:    Valentina Manea <valentina.manea.m@gmail.com>
  M:    Shuah Khan <shuah@kernel.org>
  M:    Shuah Khan <skhan@linuxfoundation.org>
 +R:    Hongren Zheng <i@zenithal.me>
  L:    linux-usb@vger.kernel.org
  S:    Maintained
  F:    Documentation/usb/usbip_protocol.rst
@@@ -23034,6 -23047,7 +23036,6 @@@ F:   drivers/gpio/gpio-xra1403.
  
  XTENSA XTFPGA PLATFORM SUPPORT
  M:    Max Filippov <jcmvbkbc@gmail.com>
 -L:    linux-xtensa@linux-xtensa.org
  S:    Maintained
  F:    drivers/spi/spi-xtensa-xtfpga.c
  F:    sound/soc/xtensa/xtfpga-i2s.c
@@@ -23116,7 -23130,7 +23118,7 @@@ S:   Maintaine
  F:    arch/x86/kernel/cpu/zhaoxin.c
  
  ZONEFS FILESYSTEM
 -M:    Damien Le Moal <damien.lemoal@opensource.wdc.com>
 +M:    Damien Le Moal <dlemoal@kernel.org>
  M:    Naohiro Aota <naohiro.aota@wdc.com>
  R:    Johannes Thumshirn <jth@kernel.org>
  L:    linux-fsdevel@vger.kernel.org
index 33b3620ea45c25f7563cb5b177c7d9575fcac9df,b811dad7370a0fc00d98dde8103f07c5bf1ec5f4..51f1cd8364c241585360f8ad1976f0535b8dd4a8
@@@ -89,8 -89,8 +89,8 @@@ struct mlx5e_macsec_rx_sc 
  };
  
  struct mlx5e_macsec_umr {
 +      u8 __aligned(64) ctx[MLX5_ST_SZ_BYTES(macsec_aso)];
        dma_addr_t dma_addr;
 -      u8 ctx[MLX5_ST_SZ_BYTES(macsec_aso)];
        u32 mkey;
  };
  
@@@ -670,7 -670,7 +670,7 @@@ static int mlx5e_macsec_del_txsa(struc
  
        mlx5e_macsec_cleanup_sa(macsec, tx_sa, true);
        mlx5_destroy_encryption_key(macsec->mdev, tx_sa->enc_key_id);
-       kfree_rcu(tx_sa);
+       kfree_rcu_mightsleep(tx_sa);
        macsec_device->tx_sa[assoc_num] = NULL;
  
  out:
@@@ -849,7 -849,7 +849,7 @@@ static void macsec_del_rxsc_ctx(struct 
        xa_erase(&macsec->sc_xarray, rx_sc->sc_xarray_element->fs_id);
        metadata_dst_free(rx_sc->md_dst);
        kfree(rx_sc->sc_xarray_element);
-       kfree_rcu(rx_sc);
+       kfree_rcu_mightsleep(rx_sc);
  }
  
  static int mlx5e_macsec_del_rxsc(struct macsec_context *ctx)
@@@ -1412,7 -1412,6 +1412,7 @@@ static int macsec_aso_query(struct mlx5
        struct mlx5e_macsec_aso *aso;
        struct mlx5_aso_wqe *aso_wqe;
        struct mlx5_aso *maso;
 +      unsigned long expires;
        int err;
  
        aso = &macsec->aso;
        macsec_aso_build_wqe_ctrl_seg(aso, &aso_wqe->aso_ctrl, NULL);
  
        mlx5_aso_post_wqe(maso, false, &aso_wqe->ctrl);
 -      err = mlx5_aso_poll_cq(maso, false);
 +      expires = jiffies + msecs_to_jiffies(10);
 +      do {
 +              err = mlx5_aso_poll_cq(maso, false);
 +              if (err)
 +                      usleep_range(2, 10);
 +      } while (err && time_is_after_jiffies(expires));
 +
        if (err)
                goto err_out;
  
diff --combined fs/ext4/super.c
index f43e526112ae837498c918637f50d7e15a004a0a,405a66b47311f2ec47e9c4929f2752b733504cc5..76d1ef0efbf4bb75161b25887588021d157839db
@@@ -2500,7 -2500,7 +2500,7 @@@ static void ext4_apply_quota_options(st
                        qname = rcu_replace_pointer(sbi->s_qf_names[i], qname,
                                                lockdep_is_held(&sb->s_umount));
                        if (qname)
-                               kfree_rcu(qname);
+                               kfree_rcu_mightsleep(qname);
                }
        }
  
@@@ -5726,28 -5726,6 +5726,28 @@@ static struct inode *ext4_get_journal_i
        return journal_inode;
  }
  
 +static int ext4_journal_bmap(journal_t *journal, sector_t *block)
 +{
 +      struct ext4_map_blocks map;
 +      int ret;
 +
 +      if (journal->j_inode == NULL)
 +              return 0;
 +
 +      map.m_lblk = *block;
 +      map.m_len = 1;
 +      ret = ext4_map_blocks(NULL, journal->j_inode, &map, 0);
 +      if (ret <= 0) {
 +              ext4_msg(journal->j_inode->i_sb, KERN_CRIT,
 +                       "journal bmap failed: block %llu ret %d\n",
 +                       *block, ret);
 +              jbd2_journal_abort(journal, ret ? ret : -EIO);
 +              return ret;
 +      }
 +      *block = map.m_pblk;
 +      return 0;
 +}
 +
  static journal_t *ext4_get_journal(struct super_block *sb,
                                   unsigned int journal_inum)
  {
                return NULL;
        }
        journal->j_private = sb;
 +      journal->j_bmap = ext4_journal_bmap;
        ext4_init_journal_params(sb, journal);
        return journal;
  }
@@@ -5943,7 -5920,6 +5943,7 @@@ static int ext4_load_journal(struct sup
                err = jbd2_journal_wipe(journal, !really_read_only);
        if (!err) {
                char *save = kmalloc(EXT4_S_ERR_LEN, GFP_KERNEL);
 +
                if (save)
                        memcpy(save, ((char *) es) +
                               EXT4_S_ERR_START, EXT4_S_ERR_LEN);
                        memcpy(((char *) es) + EXT4_S_ERR_START,
                               save, EXT4_S_ERR_LEN);
                kfree(save);
 +              es->s_state |= cpu_to_le16(EXT4_SB(sb)->s_mount_state &
 +                                         EXT4_ERROR_FS);
 +              /* Write out restored error information to the superblock */
 +              if (!bdev_read_only(sb->s_bdev)) {
 +                      int err2;
 +                      err2 = ext4_commit_super(sb);
 +                      err = err ? : err2;
 +              }
        }
  
        if (err) {
@@@ -6189,13 -6157,11 +6189,13 @@@ static int ext4_clear_journal_err(struc
                errstr = ext4_decode_error(sb, j_errno, nbuf);
                ext4_warning(sb, "Filesystem error recorded "
                             "from previous mount: %s", errstr);
 -              ext4_warning(sb, "Marking fs in need of filesystem check.");
  
                EXT4_SB(sb)->s_mount_state |= EXT4_ERROR_FS;
                es->s_state |= cpu_to_le16(EXT4_ERROR_FS);
 -              ext4_commit_super(sb);
 +              j_errno = ext4_commit_super(sb);
 +              if (j_errno)
 +                      return j_errno;
 +              ext4_warning(sb, "Marked fs in need of filesystem check.");
  
                jbd2_journal_clear_err(journal);
                jbd2_journal_update_sb_errno(journal);
index 012fa0d171b274228773da662ac03c75a5e53575,c19ac1fa8a607634855917c929de9ad0e09c14ad..2ef9c719772afbd6002c4b658c3dcaaa99da1246
@@@ -768,7 -768,7 +768,7 @@@ TRACE_EVENT_RCU(rcu_torture_read
        TP_ARGS(rcutorturename, rhp, secs, c_old, c),
  
        TP_STRUCT__entry(
 -              __field(char, rcutorturename[RCUTORTURENAME_LEN])
 +              __array(char, rcutorturename, RCUTORTURENAME_LEN)
                __field(struct rcu_head *, rhp)
                __field(unsigned long, secs)
                __field(unsigned long, c_old)
        ),
  
        TP_fast_assign(
-               strncpy(__entry->rcutorturename, rcutorturename,
-                       RCUTORTURENAME_LEN);
-               __entry->rcutorturename[RCUTORTURENAME_LEN - 1] = 0;
+               strscpy(__entry->rcutorturename, rcutorturename, RCUTORTURENAME_LEN);
                __entry->rhp = rhp;
                __entry->secs = secs;
                __entry->c_old = c_old;
diff --combined kernel/rcu/tree.c
index 7b95ee98a1a53daa162396e737356c951acf51d8,734c252c1e803960418f1dba9ccc6f2ad5be110c..f52ff7241041666e0bef539351ad24c0ca326926
@@@ -640,6 -640,7 +640,7 @@@ void __rcu_irq_enter_check_tick(void
        }
        raw_spin_unlock_rcu_node(rdp->mynode);
  }
+ NOKPROBE_SYMBOL(__rcu_irq_enter_check_tick);
  #endif /* CONFIG_NO_HZ_FULL */
  
  /*
@@@ -1955,7 -1956,6 +1956,6 @@@ rcu_report_qs_rdp(struct rcu_data *rdp
  {
        unsigned long flags;
        unsigned long mask;
-       bool needwake = false;
        bool needacc = false;
        struct rcu_node *rnp;
  
                 * NOCB kthreads have their own way to deal with that...
                 */
                if (!rcu_rdp_is_offloaded(rdp)) {
-                       needwake = rcu_accelerate_cbs(rnp, rdp);
+                       /*
+                        * The current GP has not yet ended, so it
+                        * should not be possible for rcu_accelerate_cbs()
+                        * to return true.  So complain, but don't awaken.
+                        */
+                       WARN_ON_ONCE(rcu_accelerate_cbs(rnp, rdp));
                } else if (!rcu_segcblist_completely_offloaded(&rdp->cblist)) {
                        /*
                         * ...but NOCB kthreads may miss or delay callbacks acceleration
                rcu_disable_urgency_upon_qs(rdp);
                rcu_report_qs_rnp(mask, rnp, rnp->gp_seq, flags);
                /* ^^^ Released rnp->lock */
-               if (needwake)
-                       rcu_gp_kthread_wake();
  
                if (needacc) {
                        rcu_nocb_lock_irqsave(rdp, flags);
@@@ -2131,6 -2134,8 +2134,8 @@@ static void rcu_do_batch(struct rcu_dat
                                break;
                        }
                } else {
+                       // In rcuoc context, so no worries about depriving
+                       // other softirq vectors of CPU cycles.
                        local_bh_enable();
                        lockdep_assert_irqs_enabled();
                        cond_resched_tasks_rcu_qs();
@@@ -3024,18 -3029,6 +3029,18 @@@ need_offload_krc(struct kfree_rcu_cpu *
        return !!READ_ONCE(krcp->head);
  }
  
 +static bool
 +need_wait_for_krwp_work(struct kfree_rcu_cpu_work *krwp)
 +{
 +      int i;
 +
 +      for (i = 0; i < FREE_N_CHANNELS; i++)
 +              if (!list_empty(&krwp->bulk_head_free[i]))
 +                      return true;
 +
 +      return !!krwp->head_free;
 +}
 +
  static int krc_count(struct kfree_rcu_cpu *krcp)
  {
        int sum = atomic_read(&krcp->head_count);
@@@ -3119,14 -3112,15 +3124,14 @@@ static void kfree_rcu_monitor(struct wo
        for (i = 0; i < KFREE_N_BATCHES; i++) {
                struct kfree_rcu_cpu_work *krwp = &(krcp->krw_arr[i]);
  
 -              // Try to detach bulk_head or head and attach it over any
 -              // available corresponding free channel. It can be that
 -              // a previous RCU batch is in progress, it means that
 -              // immediately to queue another one is not possible so
 -              // in that case the monitor work is rearmed.
 -              if ((!list_empty(&krcp->bulk_head[0]) && list_empty(&krwp->bulk_head_free[0])) ||
 -                      (!list_empty(&krcp->bulk_head[1]) && list_empty(&krwp->bulk_head_free[1])) ||
 -                              (READ_ONCE(krcp->head) && !krwp->head_free)) {
 +              // Try to detach bulk_head or head and attach it, only when
 +              // all channels are free.  Any channel is not free means at krwp
 +              // there is on-going rcu work to handle krwp's free business.
 +              if (need_wait_for_krwp_work(krwp))
 +                      continue;
  
 +              // kvfree_rcu_drain_ready() might handle this krcp, if so give up.
 +              if (need_offload_krc(krcp)) {
                        // Channel 1 corresponds to the SLAB-pointer bulk path.
                        // Channel 2 corresponds to vmalloc-pointer bulk path.
                        for (j = 0; j < FREE_N_CHANNELS; j++) {
@@@ -4951,9 -4945,8 +4956,8 @@@ void __init rcu_init(void
        else
                qovld_calc = qovld;
  
-       // Kick-start any polled grace periods that started early.
-       if (!(per_cpu_ptr(&rcu_data, cpu)->mynode->exp_seq_poll_rq & 0x1))
-               (void)start_poll_synchronize_rcu_expedited();
+       // Kick-start in case any polled grace periods started early.
+       (void)start_poll_synchronize_rcu_expedited();
  
        rcu_test_sync_prims();
  }
index 4496975f2029f2beba52d6fb1cc3b3414737b5a9,f68ca1e6460f05e1ba6308f3de1d256b71356359..efbbec2caff832898f45e6f250c5bc43e26f04e9
@@@ -159,7 -159,7 +159,7 @@@ static void osnoise_unregister_instance
        if (!found)
                return;
  
-       kvfree_rcu(inst);
+       kvfree_rcu_mightsleep(inst);
  }
  
  /*
@@@ -217,7 -217,7 +217,7 @@@ struct osnoise_variables 
  /*
   * Per-cpu runtime information.
   */
 -DEFINE_PER_CPU(struct osnoise_variables, per_cpu_osnoise_var);
 +static DEFINE_PER_CPU(struct osnoise_variables, per_cpu_osnoise_var);
  
  /*
   * this_cpu_osn_var - Return the per-cpu osnoise_variables on its relative CPU
@@@ -240,7 -240,7 +240,7 @@@ struct timerlat_variables 
        u64                     count;
  };
  
 -DEFINE_PER_CPU(struct timerlat_variables, per_cpu_timerlat_var);
 +static DEFINE_PER_CPU(struct timerlat_variables, per_cpu_timerlat_var);
  
  /*
   * this_cpu_tmr_var - Return the per-cpu timerlat_variables on its relative CPU
@@@ -332,7 -332,7 +332,7 @@@ struct timerlat_sample 
  /*
   * Protect the interface.
   */
 -struct mutex interface_lock;
 +static struct mutex interface_lock;
  
  /*
   * Tracer data.
@@@ -1296,7 -1296,7 +1296,7 @@@ static void notify_new_max_latency(u64 
        rcu_read_lock();
        list_for_each_entry_rcu(inst, &osnoise_instances, list) {
                tr = inst->tr;
 -              if (tr->max_latency < latency) {
 +              if (tracer_tracing_is_on(tr) && tr->max_latency < latency) {
                        tr->max_latency = latency;
                        latency_fsnotify(tr);
                }
@@@ -1738,8 -1738,6 +1738,8 @@@ static int timerlat_main(void *data
  
                trace_timerlat_sample(&s);
  
 +              notify_new_max_latency(diff);
 +
                timerlat_dump_stack(time_to_us(diff));
  
                tlat->tracing_thread = false;
@@@ -2241,8 -2239,8 +2241,8 @@@ static struct trace_min_max_param osnoi
  /*
   * osnoise/timerlat_period: min 100 us, max 1 s
   */
 -u64 timerlat_min_period = 100;
 -u64 timerlat_max_period = 1000000;
 +static u64 timerlat_min_period = 100;
 +static u64 timerlat_max_period = 1000000;
  static struct trace_min_max_param timerlat_period = {
        .lock   = &interface_lock,
        .val    = &osnoise_data.timerlat_period,