1. 23 Aug, 2022 10 commits
    • Alexander Aring's avatar
      fs: dlm: remove dlm_del_ast prototype · e152c38d
      Alexander Aring authored
      This patch removes dlm_del_ast() prototype which is not being used in
      the dlm subsystem because there is not implementation for it.
      Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
      Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
      e152c38d
    • Alexander Aring's avatar
      fs: dlm: handle rcom in else if branch · f45307d3
      Alexander Aring authored
      Currently we handle in dlm_receive_buffer() everything else than a
      DLM_MSG type as DLM_RCOM message. Although a different message than
      DLM_MSG should be a DLM_RCOM we should explicit check on DLM_RCOM and
      drop a log_error() if we see something unexpected.
      Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
      Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
      f45307d3
    • Alexander Aring's avatar
      fs: dlm: allow lockspaces have zero lvblen · b5c9d37c
      Alexander Aring authored
      A dlm user may not use the DLM_LKF_VALBLK flag in the DLM API,
      so a zero lvblen should be allowed as a lockspace parameter.
      Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
      Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
      b5c9d37c
    • Alexander Aring's avatar
      fs: dlm: fix invalid derefence of sb_lvbptr · 7175e131
      Alexander Aring authored
      I experience issues when putting a lkbsb on the stack and have sb_lvbptr
      field to a dangled pointer while not using DLM_LKF_VALBLK. It will crash
      with the following kernel message, the dangled pointer is here
      0xdeadbeef as example:
      
      [  102.749317] BUG: unable to handle page fault for address: 00000000deadbeef
      [  102.749320] #PF: supervisor read access in kernel mode
      [  102.749323] #PF: error_code(0x0000) - not-present page
      [  102.749325] PGD 0 P4D 0
      [  102.749332] Oops: 0000 [#1] PREEMPT SMP PTI
      [  102.749336] CPU: 0 PID: 1567 Comm: lock_torture_wr Tainted: G        W         5.19.0-rc3+ #1565
      [  102.749343] Hardware name: Red Hat KVM/RHEL-AV, BIOS 1.16.0-2.module+el8.7.0+15506+033991b0 04/01/2014
      [  102.749344] RIP: 0010:memcpy_erms+0x6/0x10
      [  102.749353] Code: cc cc cc cc eb 1e 0f 1f 00 48 89 f8 48 89 d1 48 c1 e9 03 83 e2 07 f3 48 a5 89 d1 f3 a4 c3 66 0f 1f 44 00 00 48 89 f8 48 89 d1 <f3> a4 c3 0f 1f 80 00 00 00 00 48 89 f8 48 83 fa 20 72 7e 40 38 fe
      [  102.749355] RSP: 0018:ffff97a58145fd08 EFLAGS: 00010202
      [  102.749358] RAX: ffff901778b77070 RBX: 0000000000000000 RCX: 0000000000000040
      [  102.749360] RDX: 0000000000000040 RSI: 00000000deadbeef RDI: ffff901778b77070
      [  102.749362] RBP: ffff97a58145fd10 R08: ffff901760b67a70 R09: 0000000000000001
      [  102.749364] R10: ffff9017008e2cb8 R11: 0000000000000001 R12: ffff901760b67a70
      [  102.749366] R13: ffff901760b78f00 R14: 0000000000000003 R15: 0000000000000001
      [  102.749368] FS:  0000000000000000(0000) GS:ffff901876e00000(0000) knlGS:0000000000000000
      [  102.749372] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  102.749374] CR2: 00000000deadbeef CR3: 000000017c49a004 CR4: 0000000000770ef0
      [  102.749376] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [  102.749378] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [  102.749379] PKRU: 55555554
      [  102.749381] Call Trace:
      [  102.749382]  <TASK>
      [  102.749383]  ? send_args+0xb2/0xd0
      [  102.749389]  send_common+0xb7/0xd0
      [  102.749395]  _unlock_lock+0x2c/0x90
      [  102.749400]  unlock_lock.isra.56+0x62/0xa0
      [  102.749405]  dlm_unlock+0x21e/0x330
      [  102.749411]  ? lock_torture_stats+0x80/0x80 [dlm_locktorture]
      [  102.749416]  torture_unlock+0x5a/0x90 [dlm_locktorture]
      [  102.749419]  ? preempt_count_sub+0xba/0x100
      [  102.749427]  lock_torture_writer+0xbd/0x150 [dlm_locktorture]
      [  102.786186]  kthread+0x10a/0x130
      [  102.786581]  ? kthread_complete_and_exit+0x20/0x20
      [  102.787156]  ret_from_fork+0x22/0x30
      [  102.787588]  </TASK>
      [  102.787855] Modules linked in: dlm_locktorture torture rpcsec_gss_krb5 intel_rapl_msr intel_rapl_common kvm_intel iTCO_wdt iTCO_vendor_support kvm vmw_vsock_virtio_transport qxl irqbypass vmw_vsock_virtio_transport_common drm_ttm_helper crc32_pclmul joydev crc32c_intel ttm vsock virtio_scsi virtio_balloon snd_pcm drm_kms_helper virtio_console snd_timer snd drm soundcore syscopyarea i2c_i801 sysfillrect sysimgblt i2c_smbus pcspkr fb_sys_fops lpc_ich serio_raw
      [  102.792536] CR2: 00000000deadbeef
      [  102.792930] ---[ end trace 0000000000000000 ]---
      
      This patch fixes the issue by checking also on DLM_LKF_VALBLK on exflags
      is set when copying the lvbptr array instead of if it's just null which
      fixes for me the issue.
      
      I think this patch can fix other dlm users as well, depending how they
      handle the init, freeing memory handling of sb_lvbptr and don't set
      DLM_LKF_VALBLK for some dlm_lock() calls. It might a there could be a
      hidden issue all the time. However with checking on DLM_LKF_VALBLK the
      user always need to provide a sb_lvbptr non-null value. There might be
      more intelligent handling between per ls lvblen, DLM_LKF_VALBLK and
      non-null to report the user the way how DLM API is used is wrong but can
      be added for later, this will only fix the current behaviour.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
      Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
      7175e131
    • Alexander Aring's avatar
      fs: dlm: handle -EINVAL as log_error() · 9ac8ba46
      Alexander Aring authored
      If the user generates -EINVAL it's probably because they are
      using DLM incorrectly.  Change the log level to make these
      errors more visible.
      Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
      Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
      9ac8ba46
    • Alexander Aring's avatar
      fs: dlm: use __func__ for function name · c2d76a62
      Alexander Aring authored
      Avoid hard-coded function names inside message format strings.
      (Prevents checkpatch warnings.)
      Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
      Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
      c2d76a62
    • Alexander Aring's avatar
      fs: dlm: handle -EBUSY first in unlock validation · 420ba3cd
      Alexander Aring authored
      This patch checks for -EBUSY conditions in dlm_unlock() before
      checking for -EINVAL conditions (except for CANCEL and
      FORCEUNLOCK calls where a busy condition is expected.)
      There are no problems with the current ordering of checks,
      but this makes dlm_unlock() consistent with dlm_lock(), and
      may avoid future problems if other checks are added.
      Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
      Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
      420ba3cd
    • Alexander Aring's avatar
      fs: dlm: handle -EBUSY first in lock arg validation · 44637ca4
      Alexander Aring authored
      During lock arg validation, first check for -EBUSY cases, then for
      -EINVAL cases. The -EINVAL checks look at lkb state variables
      which are not stable when an lkb is busy and would cause an
      -EBUSY result, e.g. lkb->lkb_grmode.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
      Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
      44637ca4
    • Alexander Aring's avatar
      fs: dlm: fix race between test_bit() and queue_work() · eef6ec9b
      Alexander Aring authored
      This patch fixes a race by using ls_cb_mutex around the bit
      operations and conditional code blocks for LSFL_CB_DELAY.
      
      The function dlm_callback_stop() expects to stop all callbacks and
      flush all currently queued onces. The set_bit() is not enough because
      there can still be queue_work() after the workqueue was flushed.
      To avoid queue_work() after set_bit(), surround both by ls_cb_mutex.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
      Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
      eef6ec9b
    • Alexander Aring's avatar
      fs: dlm: fix race in lowcomms · 30ea3257
      Alexander Aring authored
      This patch fixes a race between queue_work() in
      _dlm_lowcomms_commit_msg() and srcu_read_unlock(). The queue_work() can
      take the final reference of a dlm_msg and so msg->idx can contain
      garbage which is signaled by the following warning:
      
      [  676.237050] ------------[ cut here ]------------
      [  676.237052] WARNING: CPU: 0 PID: 1060 at include/linux/srcu.h:189 dlm_lowcomms_commit_msg+0x41/0x50
      [  676.238945] Modules linked in: dlm_locktorture torture rpcsec_gss_krb5 intel_rapl_msr intel_rapl_common iTCO_wdt iTCO_vendor_support qxl kvm_intel drm_ttm_helper vmw_vsock_virtio_transport kvm vmw_vsock_virtio_transport_common ttm irqbypass crc32_pclmul joydev crc32c_intel serio_raw drm_kms_helper vsock virtio_scsi virtio_console virtio_balloon snd_pcm drm syscopyarea sysfillrect sysimgblt snd_timer fb_sys_fops i2c_i801 lpc_ich snd i2c_smbus soundcore pcspkr
      [  676.244227] CPU: 0 PID: 1060 Comm: lock_torture_wr Not tainted 5.19.0-rc3+ #1546
      [  676.245216] Hardware name: Red Hat KVM/RHEL-AV, BIOS 1.16.0-2.module+el8.7.0+15506+033991b0 04/01/2014
      [  676.246460] RIP: 0010:dlm_lowcomms_commit_msg+0x41/0x50
      [  676.247132] Code: fe ff ff ff 75 24 48 c7 c6 bd 0f 49 bb 48 c7 c7 38 7c 01 bd e8 00 e7 ca ff 89 de 48 c7 c7 60 78 01 bd e8 42 3d cd ff 5b 5d c3 <0f> 0b eb d8 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 55 48
      [  676.249253] RSP: 0018:ffffa401c18ffc68 EFLAGS: 00010282
      [  676.249855] RAX: 0000000000000001 RBX: 00000000ffff8b76 RCX: 0000000000000006
      [  676.250713] RDX: 0000000000000000 RSI: ffffffffbccf3a10 RDI: ffffffffbcc7b62e
      [  676.251610] RBP: ffffa401c18ffc70 R08: 0000000000000001 R09: 0000000000000001
      [  676.252481] R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000005
      [  676.253421] R13: ffff8b76786ec370 R14: ffff8b76786ec370 R15: ffff8b76786ec480
      [  676.254257] FS:  0000000000000000(0000) GS:ffff8b7777800000(0000) knlGS:0000000000000000
      [  676.255239] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  676.255897] CR2: 00005590205d88b8 CR3: 000000017656c003 CR4: 0000000000770ee0
      [  676.256734] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [  676.257567] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [  676.258397] PKRU: 55555554
      [  676.258729] Call Trace:
      [  676.259063]  <TASK>
      [  676.259354]  dlm_midcomms_commit_mhandle+0xcc/0x110
      [  676.259964]  queue_bast+0x8b/0xb0
      [  676.260423]  grant_pending_locks+0x166/0x1b0
      [  676.261007]  _unlock_lock+0x75/0x90
      [  676.261469]  unlock_lock.isra.57+0x62/0xa0
      [  676.262009]  dlm_unlock+0x21e/0x330
      [  676.262457]  ? lock_torture_stats+0x80/0x80 [dlm_locktorture]
      [  676.263183]  torture_unlock+0x5a/0x90 [dlm_locktorture]
      [  676.263815]  ? preempt_count_sub+0xba/0x100
      [  676.264361]  ? complete+0x1d/0x60
      [  676.264777]  lock_torture_writer+0xb8/0x150 [dlm_locktorture]
      [  676.265555]  kthread+0x10a/0x130
      [  676.266007]  ? kthread_complete_and_exit+0x20/0x20
      [  676.266616]  ret_from_fork+0x22/0x30
      [  676.267097]  </TASK>
      [  676.267381] irq event stamp: 9579855
      [  676.267824] hardirqs last  enabled at (9579863): [<ffffffffbb14e6f8>] __up_console_sem+0x58/0x60
      [  676.268896] hardirqs last disabled at (9579872): [<ffffffffbb14e6dd>] __up_console_sem+0x3d/0x60
      [  676.270008] softirqs last  enabled at (9579798): [<ffffffffbc200349>] __do_softirq+0x349/0x4c7
      [  676.271438] softirqs last disabled at (9579897): [<ffffffffbb0d54c0>] irq_exit_rcu+0xb0/0xf0
      [  676.272796] ---[ end trace 0000000000000000 ]---
      
      I reproduced this warning with dlm_locktorture test which is currently
      not upstream. However this patch fix the issue by make a additional
      refcount between dlm_lowcomms_new_msg() and dlm_lowcomms_commit_msg().
      In case of the race the kref_put() in dlm_lowcomms_commit_msg() will be
      the final put.
      Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
      Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
      30ea3257
  2. 22 Aug, 2022 1 commit
  3. 21 Aug, 2022 17 commits
  4. 20 Aug, 2022 12 commits
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v6.0' of... · 15b3f48a
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
      
       - Fix module versioning broken on some architectures
      
       - Make dummy-tools enable CONFIG_PPC_LONG_DOUBLE_128
      
       - Remove -Wformat-zero-length, which has no warning instance
      
       - Fix the order between drivers and libs in modules.order
      
       - Fix false-positive warnings in clang-analyzer
      
      * tag 'kbuild-fixes-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        scripts/clang-tools: Remove DeprecatedOrUnsafeBufferHandling check
        kbuild: fix the modules order between drivers and libs
        scripts/Makefile.extrawarn: Do not disable clang's -Wformat-zero-length
        kbuild: dummy-tools: pretend we understand __LONG_DOUBLE_128__
        modpost: fix module versioning when a symbol lacks valid CRC
      15b3f48a
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-fixes-for-v6.0-2022-08-19' of... · 16b3d851
      Linus Torvalds authored
      Merge tag 'perf-tools-fixes-for-v6.0-2022-08-19' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull perf tools fixes from Arnaldo Carvalho de Melo:
      
       - Fix alignment for cpu map masks in event encoding.
      
       - Support reading PERF_FORMAT_LOST, perf tool counterpart for a feature
         that was added in this merge window.
      
       - Sync perf tools copies of kernel headers: socket, msr-index, fscrypt,
         cpufeatures, i915_drm, kvm, vhost, perf_event.
      
      * tag 'perf-tools-fixes-for-v6.0-2022-08-19' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
        perf tools: Support reading PERF_FORMAT_LOST
        libperf: Add a test case for read formats
        libperf: Handle read format in perf_evsel__read()
        tools headers UAPI: Sync linux/perf_event.h with the kernel sources
        tools headers UAPI: Sync x86's asm/kvm.h with the kernel sources
        tools headers UAPI: Sync KVM's vmx.h header with the kernel sources
        tools include UAPI: Sync linux/vhost.h with the kernel sources
        tools headers kvm s390: Sync headers with the kernel sources
        tools headers UAPI: Sync linux/kvm.h with the kernel sources
        tools headers UAPI: Sync drm/i915_drm.h with the kernel sources
        tools headers cpufeatures: Sync with the kernel sources
        tools headers UAPI: Sync linux/fscrypt.h with the kernel sources
        tools arch x86: Sync the msr-index.h copy with the kernel sources
        perf beauty: Update copy of linux/socket.h with the kernel sources
        perf cpumap: Fix alignment for masks in event encoding
        perf cpumap: Compute mask size in constant time
        perf cpumap: Synthetic events and const/static
        perf cpumap: Const map for max()
      16b3d851
    • Linus Torvalds's avatar
      Merge tag 's390-6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · cc1807b9
      Linus Torvalds authored
      Pull s390 updates from Alexander Gordeev:
      
       - Fix a KVM crash on z12 and older machines caused by a wrong
         assumption that Query AP Configuration Information is always
         available.
      
       - Lower severity of excessive Hypervisor filesystem error messages
         when booting under KVM.
      
      * tag 's390-6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/ap: fix crash on older machines based on QCI info missing
        s390/hypfs: avoid error message under KVM
      cc1807b9
    • Linus Torvalds's avatar
      Merge tag 'powerpc-6.0-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 32dd68f1
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
      
       - Fix atomic sleep warnings at boot due to get_phb_number() taking a
         mutex with a spinlock held on some machines.
      
       - Add missing PMU selftests to .gitignores.
      
      Thanks to Guenter Roeck and Russell Currey.
      
      * tag 'powerpc-6.0-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        selftests/powerpc: Add missing PMU selftests to .gitignores
        powerpc/pci: Fix get_phb_number() locking
      32dd68f1
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma · f31c32ef
      Linus Torvalds authored
      Pull rdma fixes from Jason Gunthorpe:
       "A few minor fixes:
      
         - Fix buffer management in SRP to correct a regression with the login
           authentication feature from v5.17
      
         - Don't iterate over non-present ports in mlx5
      
         - Fix an error introduced by the foritify work in cxgb4
      
         - Two bug fixes for the recently merged ERDMA driver
      
         - Unbreak RDMA dmabuf support, a regresion from v5.19"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
        RDMA: Handle the return code from dma_resv_wait_timeout() properly
        RDMA/erdma: Correct the max_qp and max_cq capacities of the device
        RDMA/erdma: Using the key in FMR WR instead of MR structure
        RDMA/cxgb4: fix accept failure due to increased cpl_t5_pass_accept_rpl size
        RDMA/mlx5: Use the proper number of ports
        IB/iser: Fix login with authentication
      f31c32ef
    • Guru Das Srinagesh's avatar
      scripts/clang-tools: Remove DeprecatedOrUnsafeBufferHandling check · 4be72c1b
      Guru Das Srinagesh authored
      This `clang-analyzer` check flags the use of memset(), suggesting a more
      secure version of the API, such as memset_s(), which does not exist in
      the kernel:
      
        warning: Call to function 'memset' is insecure as it does not provide
        security checks introduced in the C11 standard. Replace with analogous
        functions that support length arguments or provides boundary checks such
        as 'memset_s' in case of C11
        [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
      Signed-off-by: default avatarGuru Das Srinagesh <quic_gurus@quicinc.com>
      Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      4be72c1b
    • Masahiro Yamada's avatar
      kbuild: fix the modules order between drivers and libs · 11314751
      Masahiro Yamada authored
      Commit b2c88554 ("kbuild: update modules.order only when contained
      modules are updated") accidentally changed the modules order.
      
      Prior to that commit, the modules order was determined based on
      vmlinux-dirs, which lists core-y/m, drivers-y/m, libs-y/m, in this order.
      
      Now, subdir-modorder lists them in a different order: core-y/m, libs-y/m,
      drivers-y/m.
      
      Presumably, there was no practical issue because the modules in drivers
      and libs are orthogonal, but there is no reason to have this distortion.
      
      Get back to the original order.
      
      Fixes: b2c88554 ("kbuild: update modules.order only when contained modules are updated")
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      11314751
    • Nathan Chancellor's avatar
      scripts/Makefile.extrawarn: Do not disable clang's -Wformat-zero-length · 370655bc
      Nathan Chancellor authored
      There are no instances of this warning in the tree across several
      difference architectures and configurations. This was added by
      commit 26ea6bb1 ("kbuild, LLVMLinux: Supress warnings unless W=1-3")
      back in 2014, where it might have been necessary, but there are no
      instances of it now so stop disabling it to increase warning coverage
      for clang.
      Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      370655bc
    • Jiri Slaby's avatar
      kbuild: dummy-tools: pretend we understand __LONG_DOUBLE_128__ · 0df499ea
      Jiri Slaby authored
      There is a test in powerpc's Kconfig which checks __LONG_DOUBLE_128__
      and sets CONFIG_PPC_LONG_DOUBLE_128 if it is understood by the compiler.
      
      We currently don't handle it, so this results in PPC_LONG_DOUBLE_128 not
      being in super-config generated by dummy-tools. So take this into
      account in the gcc script and preprocess __LONG_DOUBLE_128__ as "1".
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      0df499ea
    • Masahiro Yamada's avatar
      modpost: fix module versioning when a symbol lacks valid CRC · 5b8a9a8f
      Masahiro Yamada authored
      Since commit 7b453719 ("kbuild: link symbol CRCs at final link,
      removing CONFIG_MODULE_REL_CRCS"), module versioning is broken on
      some architectures. Loading a module fails with "disagrees about
      version of symbol module_layout".
      
      On such architectures (e.g. ARCH=sparc build with sparc64_defconfig),
      modpost shows a warning, like follows:
      
        WARNING: modpost: EXPORT symbol "_mcount" [vmlinux] version generation failed, symbol will not be versioned.
        Is "_mcount" prototyped in <asm/asm-prototypes.h>?
      
      Previously, it was a harmless warning (CRC check was just skipped),
      but now wrong CRCs are used for comparison because invalid CRCs are
      just skipped.
      
        $ sparc64-linux-gnu-nm -n vmlinux
          [snip]
        0000000000c2cea0 r __ksymtab__kstrtol
        0000000000c2ceb8 r __ksymtab__kstrtoul
        0000000000c2ced0 r __ksymtab__local_bh_enable
        0000000000c2cee8 r __ksymtab__mcount
        0000000000c2cf00 r __ksymtab__printk
        0000000000c2cf18 r __ksymtab__raw_read_lock
        0000000000c2cf30 r __ksymtab__raw_read_lock_bh
          [snip]
        0000000000c53b34 D __crc__kstrtol
        0000000000c53b38 D __crc__kstrtoul
        0000000000c53b3c D __crc__local_bh_enable
        0000000000c53b40 D __crc__printk
        0000000000c53b44 D __crc__raw_read_lock
        0000000000c53b48 D __crc__raw_read_lock_bh
      
      Please notice __crc__mcount is missing here.
      
      When the module subsystem looks up a CRC that comes after, it results
      in reading out a wrong address. For example, when __crc__printk is
      needed, the module subsystem reads 0xc53b44 instead of 0xc53b40.
      
      All CRC entries must be output for correct index accessing. Invalid
      CRCs will be unused, but are needed to keep the one-to-one mapping
      between __ksymtab_* and __crc_*.
      
      The best is to fix all modpost warnings, but several warnings are still
      remaining on less popular architectures.
      
      Fixes: 7b453719 ("kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS")
      Reported-by: default avatarmatoro <matoro_mailinglist_kernel@matoro.tk>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Tested-by: default avatarmatoro <matoro_mailinglist_kernel@matoro.tk>
      5b8a9a8f
    • Linus Torvalds's avatar
      Merge tag 'block-6.0-2022-08-19' of git://git.kernel.dk/linux-block · b9bce6e5
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "A few fixes that should go into this release:
      
         - Small series of patches for ublk (ZiyangZhang)
      
         - Remove dead function (Yu)
      
         - Fix for running a block queue in case of resource starvation
           (Yufen)"
      
      * tag 'block-6.0-2022-08-19' of git://git.kernel.dk/linux-block:
        blk-mq: run queue no matter whether the request is the last request
        blk-mq: remove unused function blk_mq_queue_stopped()
        ublk_drv: do not add a re-issued request aborted previously to ioucmd's task_work
        ublk_drv: update comment for __ublk_fail_req()
        ublk_drv: check ubq_daemon_is_dying() in __ublk_rq_task_work()
        ublk_drv: update iod->addr for UBLK_IO_NEED_GET_DATA
      b9bce6e5
    • Linus Torvalds's avatar
      Merge tag 'io_uring-6.0-2022-08-19' of git://git.kernel.dk/linux-block · beaf1397
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "A few fixes for regressions in this cycle:
      
         - Two instances of using the wrong "has async data" helper (Pavel)
      
         - Fixup zero-copy address import (Pavel)
      
         - Bump zero-copy notification slot limit (Pavel)"
      
      * tag 'io_uring-6.0-2022-08-19' of git://git.kernel.dk/linux-block:
        io_uring/net: use right helpers for async_data
        io_uring/notif: raise limit on notification slots
        io_uring/net: improve zc addr import error handling
        io_uring/net: use right helpers for async recycle
      beaf1397