mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oliver Sang <oliver.sang@intel.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "Liam R. Howlett" <Liam.Howlett@oracle.com>,
	LKML <linux-kernel@vger.kernel.org>, <lkp@lists.01.org>,
	<lkp@intel.com>, <oliver.sang@intel.com>
Subject: Re: [mm] 408579cd62: WARNING:suspicious_RCU_usage
Date: Tue, 4 Jul 2023 09:46:49 +0800	[thread overview]
Message-ID: <ZKN6CdkKyxBShPHi@xsang-OptiPlex-9020> (raw)
In-Reply-To: <CAHk-=wg1_8L+e09_RuX=Z_49oLn8=w82YzCk+kybS-ymSd_zbA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3377 bytes --]

hi, Linus,

On Sun, Jul 02, 2023 at 09:34:35PM -0700, Linus Torvalds wrote:
> On Sun, 2 Jul 2023 at 19:04, kernel test robot <oliver.sang@intel.com> wrote:
> >
> > commit: 408579cd627a15bd703fe3eeb8485fd02726e9d3 ("mm: Update do_vmi_align_munmap() return semantics")
> > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master
> >
> > in testcase: boot
> >
> > on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G
> >
> > caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
> >
> >
> >
> > If you fix the issue, kindly add following tag
> > Reported-by: kernel test robot <oliver.sang@intel.com>
> >
> >
> > [  215.088258][    T1] WARNING: suspicious RCU usage
> 
> I think the
> 
>         validate_mm(mm);
> 
> call (mm/mmap.c:2561) needs to be moved up to before the
> 
>         if (unlock)
>                 mmap_read_unlock(mm);
> 
> that is just a couple of lines earlier.
> 
> Can you verify that that fixes the warning?

by patch [1], we found the warning is not fixed.


we also found there are some changes in stack backtrace. now it's as below:
(detail dmesg is attached)

[   26.412372][    T1] stack backtrace:
[   26.412846][    T1] CPU: 0 PID: 1 Comm: systemd Not tainted 6.4.0-09908-gcb226fb1fb7a #1
[   26.413506][    T1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
[   26.414326][    T1] Call Trace:
[   26.414605][    T1]  <TASK>
[   26.414847][    T1]  dump_stack_lvl+0x73/0xc0
[   26.415225][    T1]  lockdep_rcu_suspicious+0x1b7/0x280
[   26.415669][    T1]  mas_start+0x280/0x400
[   26.416037][    T1]  mas_find+0x27a/0x400
[   26.416391][    T1]  validate_mm+0x8b/0x2c0
[   26.416757][    T1]  __se_sys_brk+0xa35/0xc00
[   26.417141][    T1]  ? vtime_user_exit+0x1a6/0x280
[   26.417563][    T1]  do_syscall_64+0x2b/0x80
[   26.417935][    T1]  entry_SYSCALL_64_after_hwframe+0x5e/0xc8
[   26.418410][    T1] RIP: 0033:0x7f8a92160bb7

as a contrast, for commit 408579cd62:

[  215.095989][    T1] stack backtrace:
[  215.097067][    T1] CPU: 0 PID: 1 Comm: init Not tainted 6.4.0-09907-g408579cd627a #1
[  215.098372][    T1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
[  215.099963][    T1] Call Trace:
[  215.100474][    T1]  <TASK>
[  215.101027][    T1]  dump_stack_lvl+0x73/0xc0
[  215.101807][    T1]  lockdep_rcu_suspicious+0x1b7/0x280
[  215.102688][    T1]  mas_start+0x280/0x400
[  215.103355][    T1]  mas_find+0x27a/0x400
[  215.104024][    T1]  validate_mm+0x8b/0x2c0
[  215.104777][    T1]  do_vmi_align_munmap+0xf92/0x1180
[  215.105691][    T1]  do_vmi_munmap+0x1a4/0x240
[  215.106384][    T1]  __vm_munmap+0x19f/0x300
[  215.107145][    T1]  __x64_sys_munmap+0x60/0x80
[  215.107962][    T1]  do_syscall_64+0x2b/0x80
[  215.108784][    T1]  entry_SYSCALL_64_after_hwframe+0x5e/0xc8
[  215.109733][    T1] RIP: 0033:0x7f5ef4577e07



[1]
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -2554,11 +2554,12 @@ do_vmi_align_munmap(struct vma_iterator *vmi, struct vm_area_struct *vma,
        mas_set(&mas_detach, start);
        remove_mt(mm, &mas_detach);
        __mt_destroy(&mt_detach);
+
+       validate_mm(mm);
+
        if (unlock)
                mmap_read_unlock(mm);

-
-       validate_mm(mm);
        return 0;

 clear_tree_failed:


> 
>                  Linus

[-- Attachment #2: dmesg.xz --]
[-- Type: application/x-xz, Size: 15224 bytes --]

  parent reply	other threads:[~2023-07-04  1:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-03  2:04 kernel test robot
2023-07-03  4:34 ` Linus Torvalds
2023-07-03 17:00   ` Conor Dooley
2023-07-03 17:07     ` Linus Torvalds
2023-07-03 17:20       ` Conor Dooley
2023-07-03 17:34         ` Marc Zyngier
2023-07-03 17:46           ` Linus Torvalds
2023-07-03 18:11             ` Palmer Dabbelt
2023-07-03 18:33               ` Marc Zyngier
2023-07-04  1:46   ` Oliver Sang [this message]
2023-07-04  2:29     ` Linus Torvalds
2023-07-04 13:51       ` Oliver Sang
2023-07-04 15:25         ` Liam R. Howlett
2023-07-04 18:04           ` Liam R. Howlett

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZKN6CdkKyxBShPHi@xsang-OptiPlex-9020 \
    --to=oliver.sang@intel.com \
    --cc=Liam.Howlett@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=lkp@lists.01.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®