linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Hillf Danton <hdanton@sina.com>
Cc: syzbot <syzbot+a923008018a2d298247b@syzkaller.appspotmail.com>,
	akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	Minchan Kim <minchan@kernel.org>,
	Johannes Weiner <hannes@cmpxchg.org>,
	linux-mm@kvack.org, syzkaller-bugs@googlegroups.com
Subject: Re: kernel BUG at include/linux/mm.h:699
Date: Mon, 20 Apr 2020 17:06:58 +0200	[thread overview]
Message-ID: <20200420150658.GR27314@dhcp22.suse.cz> (raw)
In-Reply-To: <20200420041533.5304-1-hdanton@sina.com>

On Mon 20-04-20 12:15:33, Hillf Danton wrote:
> 
> Sun, 19 Apr 2020 08:28:14 -0700
> > syzbot found the following crash on:
> > 
> > HEAD commit:    8632e9b5 Merge tag 'hyperv-fixes-signed' of git://git.kern..
> > git tree:       upstream
> > console output: https://syzkaller.appspot.com/x/log.txt?x=11ac6be0100000
> > kernel config:  https://syzkaller.appspot.com/x/.config?x=5d351a1019ed81a2
> > dashboard link: https://syzkaller.appspot.com/bug?extid=a923008018a2d298247b
> > compiler:       gcc (GCC) 9.0.0 20181231 (experimental)
> > 
> > Unfortunately, I don't have any reproducer for this crash yet.
> > 
> > IMPORTANT: if you fix the bug, please add the following tag to the commit:
> > Reported-by: syzbot+a923008018a2d298247b@syzkaller.appspotmail.com
> > 
> > raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
> > page dumped because: VM_BUG_ON_PAGE(page_ref_count(page) == 0)

This looks like a page reference count underflow. If there is a
reproducer then page_owner might help to tell who was the last owner.
[...]
 
> Flush TLB every chance before we get every thing done.
> 
> --- a/mm/memory.c
> +++ b/mm/memory.c
> @@ -1080,8 +1080,8 @@ again:
>  			page_remove_rmap(page, false);
>  			if (unlikely(page_mapcount(page) < 0))
>  				print_bad_pte(vma, addr, ptent, page);
> +			force_flush = 1;
>  			if (unlikely(__tlb_remove_page(tlb, page))) {
> -				force_flush = 1;
>  				addr += PAGE_SIZE;
>  				break;
>  			}
> @@ -1146,10 +1146,9 @@ again:
>  		tlb_flush_mmu(tlb);
>  	}
>  
> -	if (addr != end) {
> -		cond_resched();
> +	cond_resched();
> +	if (addr != end)
>  		goto again;
> -	}
>  
>  	return addr;
>  }
 
This patch doesn't make any sense to me wrt to the above report. What
are you trying to achieve?

-- 
Michal Hocko
SUSE Labs


  reply	other threads:[~2020-04-20 15:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-19 15:28 kernel BUG at include/linux/mm.h:LINE! (6) syzbot
2020-04-20  4:15 ` kernel BUG at include/linux/mm.h:699 Hillf Danton
2020-04-20 15:06   ` Michal Hocko [this message]
2020-09-26  3:21 ` kernel BUG at include/linux/mm.h:LINE! (6) syzbot

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=20200420150658.GR27314@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=hdanton@sina.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=syzbot+a923008018a2d298247b@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    /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;
as well as URLs for NNTP newsgroup(s).